百度编辑器 UEditor 1.4.3.3 上传或插入视频后代码被过滤问题

网站的编辑器上传视频就会被清空过滤掉,原因是百度编辑器 UEditor为了防止 xss 攻击而设置的白名单导致的。


修改ueditor.config.js两个地方即可



img:    ['src', 'alt', 'title', 'width', 'height', 'id', '_src', '_url', 'loadingclass', 'class', 'data-latex'],
video:  ['autoplay', 'controls', 'loop', 'preload', 'src', 'height', 'width', 'class', 'style'],
source: ['src', 'type'],  
embed:  ['type', 'class', 'pluginspage', 'src', 'width', 'height', 'align', 'style', 'wmode', 'play', 'loop', 'menu', 'allowscriptaccess', 'allowfullscreen']


Αυτό το άρθρο προέρχεται από http://www.chieng.cn, αναπαράγεται διευκρινίστε!
打赏 支付宝打赏 微信打赏

评论

Top