escape method of utils breaks rich text editing on second pass
There is code in the escape method to be clever and prevent double-escaping:
.replace(/&(?!\w+;)/g, '&')
Unfortunately, if you're discussing HTML in a rich text editor, you're going to deliberately write things like:
Which need to be double-escaped when you output them again to be edited again. Otherwise the rich text editor sees them as rich markup and not as text talking about rich markup.
Double-escape prevention as a default behavior that can't be overridden is problematic.
I'm going to see what happens if I write a custom alwaysEscape filter and use <%-.
Sigh, of course Markdown ate that, what I meant to show was something like this:
And here you'll want a textarea in your template!
<textarea>...</textarea>
I encountered this issue while blogging about node in a blog written in node (:
@boutell I am in the same boat you where two years ago. Did you ever end up making that alwaysEscape filter and if not how did get around the problem? thanks!