过滤所见所得编辑器里的危险脚本三

过滤所见所得编辑器里的危险脚本

<textarea id="bug" cols="80" rows="5"><a style="color:epression(‘red’)">test</a></textarea><button id="kick">抓虫4</button><script>function kickBug(str) { return str.replace(/epression\((.|\n)*\);?/ig,"");}HTMLElement.prototype.__defineGetter__("innerText",function(){return this.textContent;});HTMLElement.prototype.__defineSetter__("innerText",function(text){this.textContent = text;});document.getElementById("kick").onclick = function() { var bug = document.getElementById("bug"); bug.innerText = kickBug(bug.innerText);}</script>

<textarea id="bug" cols="80" rows="5"><iFrameonload =’test’></iframe></textarea><button id="kick">抓虫5</button><script>function kickBug(str) { return str.replace(/<iframe(.|\n)*\/iframe>\s*/ig,"");}HTMLElement.prototype.__defineGetter__("innerText",function(){return this.textContent;});HTMLElement.prototype.__defineSetter__("innerText",function(text){this.textContent = text;});document.getElementById("kick").onclick = function() { var bug = document.getElementById("bug"); bug.innerText = kickBug(bug.innerText);}</script>

人生就像是一场旅行,遇到的既有感人的,

过滤所见所得编辑器里的危险脚本三

相关文章:

你感兴趣的文章:

标签云: