How JavaScript escapes html tags
This article will explain in detail how JavaScript escapes html tags. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.
Escape html tag function HtmlEncode (text) {
Return text
.replace (/ & / g, "&")
.replace (/\ "/ g,'"')
.replace (/ / g, ">")
} this is the end of the article on "how JavaScript escapes html tags". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.