玩蛋去吧 关注:174贴子:2,152
  • 8回复贴,共1

反和谐代码

只看楼主收藏回复



1楼2013-02-24 14:26回复
    普通楼反和谐:javascript:(function (){var str=rich_postor._editor.getHtml();var out="";for(var i=0;i<str.length;i++){if(str.charCodeAt(i)<128){out+=str.charAt(i);}else{var uc=str.charCodeAt(i);if((uc&0xFC00)==0xD800)uc=(uc-0xD800)*1024+str.charCodeAt(i+1)-0xDC00+0x10000,i++;{out+="&#"+uc+";";}}}str = out.replace(/<\/?a[^>]*>/gi, "").replace(/&amp;/gi, "&");var temps = new Array();var i = 0;while (/<[^>]*>|&nbsp;|@\S*/.test(str)){temps[i] = /<[^>]*>|&nbsp;|@\S*/.exec(str);str = str.replace(temps[i], "㊣");i++;}out = "";for (var i = 0; i < str.length; i++){out += "&#" + str.charCodeAt(i) + ";";}for (var i = 0; i < temps.length; i++){var temp = temps[i] + "";out = out.replace(/&#12963;/, temp);}rich_postor._editor.getHtml=function (){return out;};rich_postor._submit();})();
    楼中楼反和谐:javascript:var A2W=function(str){var out="";for(var i=0;i<str.length;i++){if(str.charCodeAt(i)<128){out+=str.charAt(i);}else{var uc=str.charCodeAt(i);if((uc&0xFC00)==0xD800)uc=(uc-0xD800)*1024+str.charCodeAt(i+1)-0xDC00+0x10000,i++;{out+="&#"+uc+";";}}}str = out.replace(/<\/?a[^>]*>/gi, "").replace(/&amp;/gi, "&");var temps = new Array();var i = 0;while (/<[^>]*>|&nbsp;|@\S*/.test(str)){temps[i] = /<[^>]*>|&nbsp;|@\S*/.exec(str);str = str.replace(temps[i], "㊣");i++;}out = "";for (var i = 0; i < str.length; i++){out += "&#" + str.charCodeAt(i) + ";";}for (var i = 0; i < temps.length; i++){var temp = temps[i] + "";out = out.replace(/&#12963;/, temp);}return out};SimplePostor.prototype._getHtml=function(){var a=this._se.getHtml();a=a.replace(/<br[^>]*>/gi," ").replace(/[\u3000\s]+/g," ").replace(/&nbsp;/g," ");a=A2W(a);return a};void 0


    2楼2013-02-24 14:26
    回复
      卧槽,你再啃上校鸡块的话我就叫警察把你带走。什么?你是要革命不成?


      3楼2013-02-24 14:27
      收起回复
        卧槽,你再啃上校鸡块的话我就叫警察把你带走。什么?你是要革命不成?


        4楼2013-03-05 01:42
        回复


          5楼2013-04-07 22:46
          回复
            慌得要死!


            来自Android客户端6楼2014-04-09 22:27
            回复
              有没有人
                 “我爱你就是爱你 不服气你来爱我啊!”


              来自Android客户端7楼2014-05-02 10:54
              回复


                IP属地:广东8楼2015-08-07 20:08
                回复