diff --git a/src/service/util.js b/src/service/util.js index 72e0e4f8..d769f8c3 100644 --- a/src/service/util.js +++ b/src/service/util.js @@ -119,9 +119,12 @@ function md2enml( result ) { * Clear Html to MD, erorr * * @param {string} convert string + * @param {boolen} header + * + * @return {string} format string */ -function clearMD( str ) { - str = `> 本文由 [简悦 SimpRead](http://ksria.com/simpread/) 转码, 原文地址 ${ window.location.href } \r\n\r\n ${str}`; +function clearMD( str, header = true ) { + header && ( str = `> 本文由 [简悦 SimpRead](http://ksria.com/simpread/) 转码, 原文地址 ${ window.location.href } \r\n\r\n ${str}` ); str = str.replace( /<\/?(ins|font|span|div|canvas|noscript|fig\w+)[ -\w*= \w=\-.:&\/\/?!;,%+()#'"{}\u4e00-\u9fa5]*>/ig, "" ) .replace( /sr-blockquote/ig, "blockquote" ) .replace( /<\/?style[ -\w*= \w=\-.:&\/\/?!;,+()#"\S]*>/ig, "" )