更新说明
该方法同样适用于解析 HTML 的任意标签元素(video/script/iframe/address/section)等等;
成功展示效果展示
插入视频
<video src="https://limbopro.com/usr/uploads/2019/05/3093449111.mkv" width="100%" height="360" controls="controls"></video>
异步加载JavaScript
<script async src="https://telegram.org/js/telegram-widget.js?14" data-telegram-post="limboprossr/2135" data-width="100%"></script>
<a href="https://twitter.com/intent/tweet?screen_name=limboprossr&ref_src=twsrc%5Etfw" class="twitter-mention-button" data-related="limboprossr" data-lang="zh-cn" data-show-count="false">Tweet to @limboprossr</a><script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
发布推特
引入视频嵌入代码
文章编辑器内插入代码如下:
<video src="https://limbopro.com/usr/uploads/2019/05/3093449111.mkv" width="100%" height="320" controls="controls"></video>
代码无效的解决方法
给Typecho站点文章添加更多HTML标签支持
1.进入 Typecho 根目录 /var/ 找到 HyperDown.php
2.找到 17行
/**
* html tags
*
* @var string
*/
public $_blockHtmlTags = 'p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|address|form|fieldset|iframe|hr|legend|article|section|nav|aside|hgroup|header|footer|figcaption|svg|script|noscript';
添加 video 即可,其他同理;
public $_commonWhiteList = 'kbd|b|i|strong|em|sup|sub|br|code|del|a|hr|video|small';
附注
标签引用:http://www.w3school.com.cn/tags/tag_video.asp
版权属于:毒奶
联系我们:https://limbopro.com/6.html
毒奶搜索:https://limbopro.com/search.html
机场推荐:https://limbopro.com/865.html IEPL专线/100Gb/¥15/月起
毒奶导航:https://limbopro.com/daohang/index.html本文链接:https://limbopro.com/archives/58.html
本文采用 CC BY-NC-SA 4.0 许可协议,转载或引用本文时请遵守许可协议,注明出处、不得用于商业用途!