From 0b323589366765b5351749b71860b25d1a67b2b3 Mon Sep 17 00:00:00 2001 From: tinkerinthevoid <44151509+tinkerinthevoid@users.noreply.github.com> Date: Thu, 14 Feb 2019 16:01:21 +0200 Subject: [PATCH] fix(guide): add warning about a potential security issue (#33221) --- guide/english/jquery/jquery-html-method/index.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/guide/english/jquery/jquery-html-method/index.md b/guide/english/jquery/jquery-html-method/index.md index ec3b1318c9..c237ae2a15 100644 --- a/guide/english/jquery/jquery-html-method/index.md +++ b/guide/english/jquery/jquery-html-method/index.md @@ -29,6 +29,9 @@ $('p').html('Hello World!'); That will set the content of all of the `
` 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 [W3Schools](https://www.w3schools.com/jquery/html_html.asp)