'&' symbol NOT as & amp
'&' symbol NOT as & amp
antonis80
Posts: 18Questions: 8Answers: 0
I am using the PHP Editor and whenever the values of any of the input fields to be submitted in a MYSQL table contain the '&' symbol it is then inserted as "& amp" i want to avoid this so as to avoid the hasle of "addlsashes" and "htmlentities" any advice will really help!! thank you
This discussion has been closed.
Answers
For anyone interested solved it with the following:
->getFormatter( function ( $val, $data, $opts ) { return htmlspecialchars_decode($val);} )
->setFormatter( function ( $val, $data, $opts ) { return htmlspecialchars_decode($val);} ),
This is part of Editor's XSS protection. Because DataTables doesn't encode HTML when writing it into the DOM automatically (although there is a renderer for that), Editor stores the data in the safe format. You can use the
->xss( false )
method to disable that.Then use this renderer to make sure you are still safe from XSS.
Allan