oalders / html-restrict

HTML::Restrict - Strip away unwanted HTML tags
Other
10 stars 9 forks source link

Adds option to encode unsafe characters in text content #3

Closed evoyy closed 11 years ago

evoyy commented 11 years ago

Thanks for this module. I like its simplicity. I have added a patch to escape invalid characters in text content. I tried to find a way to do this in some post-processing, but the only possible place is during the parsing, otherwise it would encode all the legitimate html characters in addition to any unsafe ones. Please take a look and see what you think.

evoyy commented 11 years ago

I am withdrawing this for now, as it seems to be incompatible with Markdown, which automatically converts characters into entities under some circumstances.

oalders commented 11 years ago

OK. Sorry I didn't get back to you sooner. If you get it figured out, feel free to re-open this. :)