Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latte: |noescape is order independent #799

Open
martinsifra opened this issue Feb 5, 2020 · 2 comments
Open

Latte: |noescape is order independent #799

martinsifra opened this issue Feb 5, 2020 · 2 comments

Comments

@martinsifra
Copy link
Contributor

Good news everyone,

as all we know Latte filters are applied from left to right - except |noecape. Internaly ecaping is just a flag turning off escaping of current literal. (Hope I've found the correct source doing this.)

In documentation there is no mention the order in filters of |noescape matters.

PS: I'd like to add this note, bute there's no way how to edit Latte docs.

@dg
Copy link
Member

dg commented Feb 9, 2020

It works as you write. Do you have any idea when this behavior might confuse someone?

(Latte docs is in branch nette.org https://github.com/nette/docs/tree/nette.org)

@martinsifra
Copy link
Contributor Author

If you don't it's just a flag, there can be misunderstanding when combine with other filters. You start thinking if comes firt translation or escaping, replace or escapint, etc. But the result is that everything goes in the left to right order and after all is noescape applied.

I must be blind. I didn't see latte folder in docs repo 😀 Thank you, I'll add this note.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants