Storing Single Quotes Editor.
Storing Single Quotes Editor.

Is there a way to single quotes in the database. Below is the hack I came up with to hide the single quotes escape .
int locationNameFormPostion = 1;
string @locationName = request.Form[locationNameFormPostion].Replace("'", "`").ToUpper();
editor.Field(new Field("LocationName"));
editor.Field("LocationName").SetValue(@locationName);
This discussion has been closed.
Answers
That is annoying. Its caused by the Microsoft AntiXSS library that Editor makes use of. It looks like it is being a bit over keen in how it escapes anything that could possibly relate to an XSS attach. To disable use
.Xss( false )
on the field you want to stop that from happening on - e.g.:More information about Xss protection in the Editor and DataTables manuals.
Regards,
Allan