Question

I'm using markdown and HTMLpurifier and I want to have examples of shorthand PHP (<?= $variable ?>) in the markdown code (using the indent syntax) however HTMLpurifier is not recognizing the tag < as an allowed element and is escaping it.

Any idea what config option I need to enable in HTMLpurifier to stop it escaping this?

Was it helpful?

Solution

It's currently unsupported, you might be interested in joining this old thread from HTMLpurifier forums - PHP shorthand tag

Another solution is to run your own str_replace to restore php sections if that is feasible and doesn't cause any security holes.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top