"&" Vs "&";
"&" Vs "&";
I found many posts regarding encoding but none that could solve my problem.
I have the following issue with special character
1. when I have the character
& in my sql table, I see it as
& in my datatable
2. but when I edit the same item from the datable, although I still see it as
& in my datatable, it stores
& in mysql table
3. as a result, for example, in the select fields using this value, I can see
& and not
The table and data are set to utf8mb4_general_ci
I also added utf-8 in the config.php file:
$sql_details = array( "type" => "", "user" => "", "pass" => "", "host" => "", "port" => "", "db" => "", "dsn" => "charset=utf8" );
Any idea where it could come from?
It will be from the XSS protection that is enabled by default. Add
->xss(false)to disable the XSS protection for a field, but make sure you use the text renderer to stop potential XSS attacks.
Thanks, it works now.
As for the render, is using something like:
If data such as
data.vin_sousvignobles.sousvignobleis input by a potentially untrusted user, you should escape any HTML in it. Otherwise you are open to an XSS attack.