半点优化网 http://www.bdxc.net/
当前位置首页 > 网站技术问题> 正文

清理html垃圾代码 不起作用。。

2022-10-09 13:00:31 暂无评论 13 网站技术问题 清理   垃圾   作用

<script language=javascript>
<!--
function cleanWordString(html) {
html = html.replace(/ <\/?SPAN[^> ]*> /gi, );
html = html.replace(/ <(\w[^> ]*) class=([^ |> ]*)([^> ]*)/gi, <$1$3 ) ;
html = html.replace(/ <(\w[^> ]*) lang=([^ |> ]*)([^> ]*)/gi, <$1$3 )
html = html.replace(/ <\\?\?xml[^> ]*> /gi, ) ;
html = html.replace(/ <\/?\w+:[^> ]*> /gi, ) ;
html = html.replace(/ /, );
var re = new RegExp( ( <P)([^> ]*> .*?)( <\/P> ) , gi ) ;
html = html.replace( re, <div$2 </div> ) ;
return html
}
//-->
</script>

猜你喜欢

随机文章


    Warning: require(): open_basedir restriction in effect. File(/www/wwwroot/bdxc.net/e/class/connect.php) is not within the allowed path(s): (/www/wwwroot/www.bdxc.net/:/tmp/) in /www/wwwroot/www.bdxc.net/1.php on line 4

    Warning: require(/www/wwwroot/bdxc.net/e/class/connect.php): failed to open stream: Operation not permitted in /www/wwwroot/www.bdxc.net/1.php on line 4

    Fatal error: require(): Failed opening required '/www/wwwroot/bdxc.net/e/class/connect.php' (include_path='.:/www/server/php/56/lib/php') in /www/wwwroot/www.bdxc.net/1.php on line 4