jade-php icon indicating copy to clipboard operation
jade-php copied to clipboard

how to turn off htmlspecialchars?

Open fuddl opened this issue 10 years ago • 1 comments

is there a way to prevent jade-php from writing htmlspecialchars()?

fuddl avatar Jan 28 '15 14:01 fuddl

With regular Jade, assuming you have a variable named test which contains "Apple & Orange", p= test would html escape the contents of test, giving you <p>Apple &amp; Orange</p>

p!= test would not html escape the output and would instead give you <p>Apple & Orange</p>

Similarly, jade-php extends this syntax of = for "buffered" output and != for non-buffered output.

So, to answer your question, if you want to not see htmlspecialchars() in your output, then use != instead of =.

kevindice avatar Apr 04 '15 20:04 kevindice