Markdown不支持embed标签(比如youku视频)?求解!
<embed src="http://player.youku.com/player.php/sid/XNzMxNzUyMzY=/v.swf" allowFullScreen="true" quality="high" width="480" height="400" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash"></embed>
6 回复
如果是nodeclub见README.md,内容如下
allowedTags 添加:
embed //支持 flash 视频
table|thead|tbody|tr|td|th|caption //支持表格
allowedAttributes 添加:
embed:'src|quality|width|height|align|allowScriptAccess|allowFullScreen|mode|type'
table: 'class'
经测试加了embed标签是可以支持flash的
exports.markdown = function(text, forceProtocol){
var allowedTags =
'a|b|blockquote|code|del|dd|dl|dt|em|h1|h2|h3|i'+
'|img|li|ol|p|pre|sup|sub|strong|strike|ul|br|hr'+
'|embed|table|thead|tbody|tr|td|th|caption',
allowedAttributes = {
'img': 'src|width|height|alt',
'a': 'href',
'*': 'title',
'embed': 'src|quality|width|height|align|allowScriptAccess|allowFullScreen|mode|type',
'table': 'class'
}
return Markdown(text, true, allowedTags, allowedAttributes, forceProtocol);
}