Manual:$wgRawHtml/zh

详情
向 MediaWiki 路径中的 LocalSettings.php 文件加入 ，wiki 就会允许插入未经检查的原始 HTML. 但是，您必须在标记中嵌入html，这样MediaWiki才能区分它.

自MediaWiki 1.29起，原始HTML标签在8号命名空间（MediaWiki）不再起作用：T156184.



启用原始HTML是必要的吗？
有些HTML标签在wikitext中是允许的，即便有. 参见m:帮助:Wikitext中的HTML. Wikimedia网站上能看到的绝大多数花哨排版都是利用这些有限的标签实现的（例如带CSS的表格）. 如果你能在限制下凑合着用（保持），你的wiki会更安全.

另外注意这些“有限的”wiki语法实际上是对wiki的一种刻意设计的特性. 它是个小型、简化的标记语法，非技术型用户能轻易理解，在差异查看中能轻松可视化，并且能劝阻样式方面的小修小补，以让用户更注重编写有用/有意思的文本.



相关扩展
There are a number of extensions which promise to allow more HTML flexibility, while improving the security situation. Some require setting in conjunction with using the extension, while others offer an alternative.


 * - list of extensions that allow for the inclusion of raw HTML
 * – Allows only sysops and certain user groups to edit pages containing the tag.
 * - allows HTML in specific namespaces.
 * – adds "secret key" protection for html sections.
 * – allows pre-defined HTML snippets with.
 * – allows HTML and Smarty PHP templates, ostensibly in the form of "widgets", but it can do nearly anything else too.

Another way get custom HTML appearing within your wiki articles is to develop your own tag extension. Do not be tempted to develop an extension which allows arbitrary HTML, otherwise the same serious security issues apply as with setting.