File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
packages/lit-dev-content/site/docs/v3/templates Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -1448,8 +1448,14 @@ parse such a string as HTML and render it in a Lit template.
1448
1448
1449
1449
Note, the string passed to ` unsafeHTML ` must be developer-controlled and not
1450
1450
include untrusted content. Examples of untrusted content include query string
1451
- parameters and values from user inputs. Untrusted content rendered with this
1452
- directive could lead to [ cross-site scripting (XSS)] ( https://en.wikipedia.org/wiki/Cross-site_scripting ) vulnerabilities.
1451
+ parameters and values from user inputs.
1452
+
1453
+ Untrusted content rendered with this directive could lead to [ cross-site
1454
+ scripting (XSS)] ( https://en.wikipedia.org/wiki/Cross-site_scripting ) , CSS
1455
+ injection, data exfiltration, etc. vulnerabilities. ` unsafeHTML ` uses
1456
+ ` innerHTML ` to parse the HTML string, so the security implications are the same
1457
+ as ` innerHTML ` , [ as documented on
1458
+ MDN] ( https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML#security_considerations ) .
1453
1459
1454
1460
</div >
1455
1461
You can’t perform that action at this time.
0 commit comments