Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 144bcc8

Browse files
committed
docs($interpolateProvider): document XSS in $interpolate
`$interpolateProvider.startSymbol` & friends are often used dangerously, to embed Angular templating in other templating languages. This change documents that that is a very dangerous practice.
1 parent 693021c commit 144bcc8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/ng/interpolate.js

+8
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ $interpolateMinErr.interr = function(text, err) {
2020
*
2121
* Used for configuring the interpolation markup. Defaults to `{{` and `}}`.
2222
*
23+
* <div class="alert alert-danger">
24+
* This feature is sometimes used to mix different markup languages, e.g. to wrap an Angular
25+
* template within a Python Jinja template (or any other template language). Mixing templating
26+
* languages is **very dangerous**. The embedding template language will not safely escape Angular
27+
* expressions, so any user-controlled values in the template will cause Cross Site Scripting (XSS)
28+
* security bugs!
29+
* </div>
30+
*
2331
* @example
2432
<example module="customInterpolationApp">
2533
<file name="index.html">

0 commit comments

Comments
 (0)