using htmlpurifier for input or output escaping/filtering
- by user214545
I am processing a user input from the public with a javascript WYSIWYG editor and I'm planning on using htmlpurifier to cleanse the text.
I thought it would be enough to use htmlpurifier on the input, stored the cleaned input in the database,and then output it without further escaping/filtering. But I've heard other opinions that you should always escape the output.
Can someone explain why I should need to cleans the output if I'm already cleaning the input?