fix(guide): add warning about a potential security issue (#33221)
This commit is contained in:
committed by
mrugesh mohapatra
parent
5e137d2022
commit
0b32358936
@ -29,6 +29,9 @@ $('p').html('Hello World!');
|
|||||||
|
|
||||||
That will set the content of all of the `<p>` elements to Hello World!
|
That will set the content of all of the `<p>` elements to Hello World!
|
||||||
|
|
||||||
|
## Warning
|
||||||
|
`.html()` method is used to set the element's content in **HTML** format. This may be dangerous if the content is provided by user. Consider using `.text()` method instead if you need to set non-HTML strings as content.
|
||||||
|
|
||||||
### More Information
|
### More Information
|
||||||
|
|
||||||
[W3Schools](https://www.w3schools.com/jquery/html_html.asp)
|
[W3Schools](https://www.w3schools.com/jquery/html_html.asp)
|
||||||
|
Reference in New Issue
Block a user