Set default antisamy behavior to encode instead of remove
GENERAL
TESTING
GENERAL
TESTING
Description
Activity
Show:

Matthew Jones September 15, 2016 at 5:24 PM
Thinking about this more, this might actually be undesirable.
If someone, for instance paste from word. Rather than removing the bad tags and attributes it would just dump them into the document instead if they were "unknown". I feel like there's more cases we might want them just removed completely rather than encoded. And the CKEditor encodes text anyway. This might be a "Won't Fix".
So I was looking at antisamy, and it looks like we can have an action of "encode" which will encode bad tags but leave them in the input rather than remove both for unknown tags and possibly for known tags.
<directive name="onUnknownTag" value="remove" /><!-- default remove, encode will keep the tag as HTML entities encoding -->
This seems like it would be nicer for the users to leave their content in there even if it doesn't function. The idea would be if the popup message also changed to reflect that contents weren't removed but they were changed. I don't know if I'd say "encoded" to the user but something along those lines. I'm guessing antisamy returns that as part of it's errors but I haven't tried that either. I'm marking this as a feature request because it would be nice to have and probably not a lot of work to implement.