/** * Returns a value string ready to be put inside quotes, with quotes and percent escaped. * * <code> * $this->db->escape_value("L'infanzia di \"maria\""); * </code> * * @param string $value The string to escape. * * @return string | false */ public function escape_value($value, $esc = "'") { if (is_string($value)) { return str_replace('%', '\\%', $esc === '"' ? \bbn\str\text::escape_dquotes($value) : \bbn\str\text::escape_squotes($value)); } return $value; }
public function ele_and_script() { return ['$(\'' . \bbn\str\text::escape_squotes($this->html()) . '\')', $this->script(false)]; }