#### 开启识别和解析 HTML 标签 配置项： { htmlDecode : true // Decode all html tags & attributes // Filter tags/attributes expression : tagName,tagName,...|attrName,attrName,... htmlDecode : "style,script,iframe,sub,sup|on*" // Filter tags, and all on* attributes //htmlDecode : "style,script,iframe,sub,sup|*" // Filter tags, and all attributes //htmlDecode : "style,script,iframe,sub,sup,embed|onclick,title,onmouseover,onmouseout,style" // Filter tags, and your custom attributes } #### 示例 ##### 上标和下标 上标：X<sup>2</sup> 下标：O<sub>2</sub> ##### 代码块里包含的过滤标签及属性不会被过滤 ```html <style type="text/style"> body{background:red;} </style> <script type="text/javscript"> alert("script"); </script> <iframe height=498 width=510 src="http://player.youku.com/embed/XMzA0MzIwMDgw" frameborder=0 allowfullscreen></iframe> ``` ##### Style <style> body{background:red;} </style> <style type="text/style"> body{background:red;} </style> ##### Script <script> alert("script"); </script> <script type="text/javscript"> alert("script"); </script> ##### Events <div style="color:green;" onclick="alert(1233);" title="div xxxxx">Events</div> <div style="color:red;" contenteditable onclick="alert(1233);" onmouseover="alert(1233);" onmouseout="alert(1233);" title="div xxxxx">Events</div> ##### 插入Flash <embed src="http://player.youku.com/player.php/sid/XMzA0MzIwMDgw/v.swf" allowFullScreen="true" quality="high" width="480" height="400" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash"></embed> ##### 插入视频 李健《最好不相见》 <iframe height=498 width=510 src="http://player.youku.com/embed/XMzA0MzIwMDgw" frameborder=0 allowfullscreen></iframe>