-
Notifications
You must be signed in to change notification settings - Fork 95
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
Attribute escaping optimization #961
Comments
👍 кажется, да. |
пывысит? |
@aristov хотел сказать "уменьшит время шаблонизации". |
narqo
pushed a commit
that referenced
this issue
Apr 17, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
У нас с незапамятных времен в базовых шаблонах BEMHTML функция attrEscape экранирует 4 символа: кавычку, амперсанд и треугольные скобки.
https://github.com/bem/bem-bl/blob/0.2/blocks-common/i-bem/__html/i-bem__html.bemhtml#L238
В bem-core так же: https://github.com/bem/bem-core/blob/v2/common.blocks/i-bem/i-bem.bemhtml#L229
А вот в BT экранируются только кавычка и амперсанд: https://github.com/enb-make/enb-bt/blob/master/lib/bt.js#L802
Я покурил интернетики на эту тему, поэкспериментировал в браузерах и пришел к выводу, что эскейпить треугольные скобки действительно не нужно (это касается только атрибутов).
В BH уже есть фикс: https://github.com/bem/bh/pull/137/files
Если оторвать эскейпинг треугольных скобок, это немного уменьшит время шаблонизации.
The text was updated successfully, but these errors were encountered: