Exception information: Unexpected token ILLEGAL
Let’s talk about the processing method first:
1. Save:
varcont=encodeURI($("#txtMessage_Content").val()).replace(/
/g,"brHH");
2. Read:
entity[i].Contents.replace(//,">").replace(/brHH/g ,"
")
Explanation: The main idea is the substitution method.
JS seems to be unable to capture the text directly. Press Enter and encodeURI to capture it.
replace(//,">")
This sentence deals with JS injection
replace(/brHH/g,"
")
Here is replacing the above with Enter Replace and display
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn