diff --git a/pages/index/index.js b/pages/index/index.js index e4f97d4..280c5cd 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -45,7 +45,12 @@ Page({ - + +

支持的标签

diff --git a/wxParse/html2json.js b/wxParse/html2json.js index 6909559..7c5754b 100755 --- a/wxParse/html2json.js +++ b/wxParse/html2json.js @@ -53,6 +53,15 @@ function removeDOCTYPE(html) { .replace(/<.*!DOCTYPE.*\>\n/, ''); } +/** + * 去除富文本字符串中的 style 标签 + * @param {String} html 富文本字符串 + */ +function removeStyleCss(html) { + return html + .replace(/\/gm, ''); +} + function trimHtml(html) { return html .replace(/\r?\n+/g, '') @@ -61,11 +70,21 @@ function trimHtml(html) { .replace(/[ ]+