Browse Source

修复下划线解析问题

shmily1213 3 weeks ago
parent
commit
05275b4c50
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/pagesStudy/components/mp-html/components/mp-html/parser.js

+ 2 - 2
src/pagesStudy/components/mp-html/components/mp-html/parser.js

@@ -5,14 +5,14 @@
 // 配置
 const config = {
   // 信任的标签(保持标签名不变)
-  trustTags: makeMap('a,abbr,ad,audio,b,blockquote,br,code,col,colgroup,dd,del,dl,dt,div,em,fieldset,h1,h2,h3,h4,h5,h6,hr,i,img,ins,label,legend,li,ol,p,q,ruby,rt,source,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,title,ul,video'),
+  trustTags: makeMap('a,abbr,ad,audio,b,blockquote,br,code,col,colgroup,dd,del,dl,dt,div,em,fieldset,h1,h2,h3,h4,h5,h6,hr,i,img,ins,label,legend,li,ol,p,q,ruby,rt,source,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,title,ul,video,u'),
 
   // 块级标签(转为 div,其他的非信任标签转为 span)
   blockTags: makeMap('address,article,aside,body,caption,center,cite,footer,header,html,nav,pre,section'),
 
   // #ifdef (MP-WEIXIN || MP-QQ || APP-PLUS || MP-360) && VUE3
   // 行内标签
-  inlineTags: makeMap('abbr,b,big,code,del,em,i,ins,label,q,small,span,strong,sub,sup'),
+  inlineTags: makeMap('abbr,b,big,code,del,em,i,ins,label,q,small,span,strong,sub,sup,u'),
   // #endif
 
   // 要移除的标签