FAQ

On 22 March 2016 at 13:24, Jan Tvrdík wrote:

The escape context could be detected (e.g. Latte template engine supports
context-aware escaping for years –
https://latte.nette.org/en/#toc-context-aware-escaping) but the logic is
quite complex for it to be included in PHP core.


Sorry, I have to... *T*O͇̹̺ͅƝ̴ȳ̳ TH̘*Ë͖́̉ ͠P̯͍̭O̚​N̐Y̡
H̸̡̪̯ͨ͊̽̅̾̎Ȩ̬̩̾͛ͪ̈́̀́͘ ̶̧̨̱̹̭̯ͧ̾ͬC̷̙̲̝͖ͭ̏ͥͮ͟Oͮ͏̮̪̝͍M̲̖͊̒ͪͩͬ̚̚͜Ȇ̴̟̟͙̞ͩ͌͝*
S̨̥̫͎̭ͯ̿̔̀ͅ

http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags,
fwiw.

No, detecting context is not possible unless you are in a very strict and
inflexible context, such as an XML-based templating engine.

Marco Pivetta

http://twitter.com/Ocramius

http://ocramius.github.com/

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

People

Translate

site design / logo © 2019 Grokbase