提交 c8b5186a 编写于 作者: ijianbo's avatar ijianbo

1.在wxparse中增加对音频的支持。

2.修复文章中英文单引号和双引号wxparse无法正常转码的问题。
上级 4fd72b44
......@@ -36,7 +36,7 @@ function strNumDiscode(str){
str = str.replace(/⊕/g, '');
str = str.replace(/⊗/g, '');
str = str.replace(/⊥/g, '');
str = str.replace(/⋅/g, '');
str = str.replace(/⋅/g, '');
return str;
}
......@@ -112,6 +112,12 @@ function strcharacterDiscode(str){
str = str.replace(/&lt;/g, '<');
str = str.replace(/&gt;/g, '>');
str = str.replace(/&#8226;/g, '');
str = str.replace(/&/g, '&');
str = str.replace(/&#8221;/g, '"');
str = str.replace(/&#8216;/g, '\'');
str = str.replace(/&#8217;/g, '\'');
return str;
}
......
......@@ -16,7 +16,12 @@
<video class="{{item.classStr}} wxParse-{{item.tag}}-video" src="{{item.attr.src}}"></video>
</view>
</template>
<template name="wxParseAudio">
<!--增加audio标签支持,并循环添加-->
<view class="{{item.classStr}} wxParse-{{item.tag}}" style="{{item.styleStr}}">
<audio poster="{{item.attr.poster}}" name="{{item.attr.name}}" author="{{item.attr.author}}" src="{{item.attr.src}}" id="myAudio" controls loop></audio>
</view>
</template>
<template name="wxParseImg">
<image class="{{item.classStr}} wxParse-{{item.tag}}" data-from="{{item.from}}" data-src="{{item.attr.src}}" data-idx="{{item.imgIndex}}" src="{{item.attr.src}}" mode="aspectFit" bindload="wxParseImgLoad" bindtap="wxParseImgTap" mode="widthFix" style="width:{{item.width}}px;"
/>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册