Disable escaping html

I just installed SyntaxHighlighter Evolved, and while testing on an existing post I was dismayed to find that all the quotes ” had been converted to " (the single quotes were fine). I was using the HTML editor. In case you are also in this position, I found that it’s just the post preview that … Read more

Should messages in WP_Error already be html escaped?

No, escaping should happen at the moment of output ( late escaping ) so that we know that it only occurs once. Double escaping can allow specially crafted output to break out. By escaping, we’re talking about functions such as esc_html, wp_kses_post, esc_url, etc. Sanitizing functions and validating functions are not the same, e.g. sanitize_textfield. … Read more

When do I need to use esc_html()? [duplicate]

While this is probably a duplicate of What’s the difference between esc_html, esc_attr, esc_html_e, and so on? I’m going to go ahead and provide an answer anyway, since as @cag8f indicated, there’s not an accepted answer on that question (but I’ll add that I think Tom’s answer there tells you what you need to know). … Read more

esc_attr / esc_html / esc_url in echos

Yes! You should always be escaping Escape Late, Escape Often Escaping is about intent, if you intend to output a URL, use esc_url, and it will definately be a URL ( if the data is malicious it will be made safe ) What I still wonder is should I always use esc_attr in HTML fields, … Read more