I am using Editor .NET Framework libraries v1.8.1 and mssql server.
When Editor writes to a varchar() field, the text is html encoded
i.e. "&" is written as "&"
Is there a way to disable this encoding?
I can solve it by adding the following to each text field:
.SetFormatter((val, data) => System.Net.WebUtility.HtmlDecode(val.ToString()))
Is there a better way?
I have no idea how similar the .NET library is to the PHP library, but this is my own note from a PHP Model using the Editor:
// Disable XSS protection for the last_name field,
// otherwise ampersands will be neutralized by the DataTables
// Editor's use of htmlAwed.
// Neutralization refers to the entitification of & to &.
(chained from a Field::inst('last_name')).
Might be some help.
The libraries are all intentionally very similar. There are platform differences, like the .NET one uses Microsoft's own XSS protection filter rather than a third party one such as htmLawed. however, the same would be true here, if you aren't worried about XSS attacks then .Xss( false ) for the field would be what to use for .NET.
.Xss( false )
It looks like you're new here. If you want to get involved, click one of these buttons!
DataTables designed and created by SpryMedia Ltd.
SpryMedia Ltd is registered in Scotland, company no. SC456502.