码迷,mamicode.com
首页 > 其他好文 > 详细

防止 xxs

时间:2019-01-25 18:45:57      阅读:121      评论:0      收藏:0      [点我收藏+]

标签:ret   script   var   return   encode   function   put   UNC   tee   

function HTMLEncode(html) {
       var temp = document.createElement("div");
       (temp.textContent != null) ? (temp.textContent = html) : (temp.innerText = html);
       var output = temp.innerHTML;
       temp = null;
       return output;
}

  

防止 xxs

标签:ret   script   var   return   encode   function   put   UNC   tee   

原文地址:https://www.cnblogs.com/nns4/p/10320886.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!