wxParse无法解析html

第一步错误代码:

<span style="color:red;font-family:" serif",tahoma,verdana,helvetica;font-size:12px;font-style:normal;font-weight:400;text-decoration:none;"="" sans="">XXXX</span>

一直以为是多个双引号引起的bug。最终发现是font-family后面多了个空格导致的。

第二步找到wxParse.js文件,把style后有空格的去掉,问题就解决

var arr1 = data.split('style=')
var ping = arr1[0] + "style=" + arr1[1].replace(/\s/g, "") ;

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理