第三方发表素材文章时,content字段会自动过滤掉iframe
上传时content为
<section><iframe class="video_iframe rich_pages" data-vidtype="2" data-mpvid="wxv_1681892499969130499" data-cover="http%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2Fv1fXoxic4bPe4ZAjLMskcgd8CGiaTSn9NnuOGWJP9LD6iadyIFJJssGeA3xTvdcTibElT6tBkDM31c9W5cVSHdV8icA%2F0%3Fwx_fmt%3Djpeg" allowfullscreen="" frameborder="0" style=" z-index:1; " data-ratio="1.7777777777777777" data-w="1920" src="https://mp.weixin.qq.com/mp/readtemplate?t=pages/video_player_tmpl&action=mpvideo&auto=0&vid=wxv_1681892499969130499"></iframe></section><br/>
返回content为
<section><iframe class="video_iframe rich_pages" data-vidtype="2" data-mpvid="wxv_1681892499969130499" data-cover="http%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2Fv1fXoxic4bPe4ZAjLMskcgd8CGiaTSn9NnuOGWJP9LD6iadyIFJJssGeA3xTvdcTibElT6tBkDM31c9W5cVSHdV8icA%2F0%3Fwx_fmt%3Djpeg" allowfullscreen="" frameborder="0" style=" z-index:1; " data-ratio="1.7777777777777777" data-w="1920"></iframe></section><br />
请问如何处理这一类的情况?
iframe的确会过滤掉src 属性,需要设置一下data-src属性就行了
肯定过滤啊,多危险,鬼知道iframe里会加载什么页面
iframe 过滤了src属性