(function () {
var content = "jQuery XSS Payloads:CVE-2020-11023、CVE-2020-11022、CVE-2019-11358\r\nhttps://github.com/cve-sandbox/jquery"; // 只保留a标签
var jsTextContent = document.getElementById("js_text_content");
var jsTextContentFake = document.getElementById("js_text_content_fake");
// console.log(content);
content = content.replace(/<(\/?)(?!((a(\s|>))|(\/a))).*?>/g, (s) => {
return s.html(true);
});
jsTextContent.innerHTML = window.__emojiFormat(content);
if (parseFloat(window.getComputedStyle(jsTextContent).height) > parseFloat(window.getComputedStyle(jsTextContentFake).height)) {
jsTextContent.parentNode.className += ' share_media_text_overflow';
}
})();
还没有评论,来说两句吧...