-
-
Notifications
You must be signed in to change notification settings - Fork 112
Description
Version: 3.1.1
Bug Description
This line changes data (i.e. content in <textarea> tag):
https://github.com/nette/latte/blob/v3.1.1/src/Latte/Runtime/HtmlHelpers.php#L48
e.g. If your value is hello {{you}} then latte tpl like <textarea>{$value}</textarea> renders
<textarea>hello {<!-- -->{you}}</textarea> which is not correct and since textareas are used to hold data, data can be lost. For a real world example, I have a complex Mermaid diagram in a database. When the value is output by latte, the injected raw html comments cause a crash in mermaid because they corrupt the value.
Steps To Reproduce
https://fiddle.nette.org/latte wasn't generating a URL when clicking Save (I assume that's what it's supposed to have done), but you can see the output:
Expected Behavior
Rendered HTML should be <textarea>hello {{you}}</textarea>