This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.6k
Escaped interpolation markers are not unescaped if there are no interpolated expressions in the same text #14196
Labels
Milestone
Comments
@timbertson the latest build (of master) is always available at https://code.angularjs.org/snapshot. |
Oh and there is a really interesting previous discussion about all of this here: #5601 |
It looks like it is a clearly chosen behaviour. I suspect for performance reasons. The path that fails to unescape these is an optimisation from @jbedard cf83b4f But he was just reproducing the previous behaviour, which seems that to go back through to 1.3.x We could do a few things to fix this but I suspect that they would all decrease performance |
gkalpak
added a commit
to gkalpak/angular.js
that referenced
this issue
Mar 8, 2016
Previously, whenever `mustHaveExpression` was true (e.g. when compiling a text nodes), `$interpolate` would not unescape the escaped interpolation markers if there were no actual interpolation expressionsin the same string. This commit fixes the problem, by always unescaping the escaped markers (if any). Due to always checking for the presence of escaped interpolation markers, there is a slight performance hit. Fixes angular#14196
gkalpak
added a commit
to gkalpak/angular.js
that referenced
this issue
Mar 8, 2016
Previously, whenever `mustHaveExpression` was true (e.g. when compiling a text nodes), `$interpolate` would not unescape the escaped interpolation markers if there were no actual interpolation expressionsin the same string. This commit fixes the problem, by always unescaping the escaped markers (if any). Due to always checking for the presence of escaped interpolation markers, there is a slight performance hit. Fixes angular#14196
gkalpak
added a commit
to gkalpak/angular.js
that referenced
this issue
Mar 8, 2016
Previously, whenever `mustHaveExpression` was true (e.g. when compiling a text node), `$interpolate` would not unescape the escaped interpolation markers if there were no actual interpolation expressionsin the same string. This commit fixes the problem, by always unescaping the escaped markers (if any). Due to always checking for the presence of escaped interpolation markers, there is a slight performance hit. Fixes angular#14196
gkalpak
added a commit
to gkalpak/angular.js
that referenced
this issue
Mar 8, 2016
Previously, whenever `mustHaveExpression` was true (e.g. when compiling a text node), `$interpolate` would not unescape the escaped interpolation markers if there were no actual interpolation expressions in the same string. This commit fixes the problem, by always unescaping the escaped markers (if any). Due to always checking for the presence of escaped interpolation markers, there is a slight performance hit. Fixes angular#14196
Here's my attempt at a fix #14199. The downsides:
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Bug
See http://plnkr.co/edit/b5PYWDpsYAoZ5LcDz6o7
{{ ... }}
Escaped interpolation markers should always be unescaped (after interpolation)
Currently it's impossible to escape
{{ ... }}
and have it always render correctly (without resorting to hacks like always inserting an empty interpolation at the start of each value).versions of Angular? Please also test with the latest stable and snapshot versions.
I wasn't able to find a nightly link, but looking at the source it hasn't changed recently.
The text was updated successfully, but these errors were encountered: