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