Line Feed (and other escape characters) displaying as their unicode value in textarea.
Line Feed (and other escape characters) displaying as their unicode value in textarea.
Hi, I have upgraded to Editor version v1.5.4. When I try to edit an entry with, for example, a line feed in it is is displayed as the unicode value of '
'. Is there a way around this? I would like it display as an actual line feed and an apostrophe as an apostrophe.
Also, is there a reason that the file 'dataTables.buttons.js' was missing from the latest release?
Thanks for your help.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Hi,
Unfortunately this is related to the XSS protection that is used in the .NET version of Editor. It uses the Microsoft security libraries which appear to encode
\n
as its HTML entity. That seems overly strict to me - I'm not sure why they would have included the new line character in their encoding list.However, the first is to "decode" it on edit. I've committed the fix locally (and it will be int he next release), but to apply it directly yourself before the next release of Editor, what to do is find the following line of code in the Editor JS source:
and replace with:
The other option is to disable the XSS protection, but I would suggest against that.
Thanks for letting me know about that.
Regards,
Allan
Hi Allan,
I applied that change and it works well. Great that we don't have to disable the XSS protection too.
Thanks for your help Allan.
Colin.