Manual:$wgRawHtml/zh

详情
当维基设置 时，允许您插入原始未检查的HTML. 但是，您必须在 标记中嵌入html，以便MediaWiki可以区分它.

Since MediaWiki 1.29, the raw HTML tag has no effect in namespace 8 (MediaWiki): T156184.

Is enabling raw HTML necessary?
Some HTML tags are permitted in wikitext, even with. See m:Help:HTML in wikitext. The vast majority of fancy formatting seen on Wikimedia sites is achieved using these limited tags (e.g. tables with CSS style tags). If you can make do with these limitations (leave ), your wiki will be more secure.

Also note that the "limited" HTML syntax is actually a deliberate design feature of wikis. It is a compact simplified markup which is easily understood even by non-technical users, easily visualised in diff displays, and discourages stylistic tinkering in favor of getting on with writing useful/interesting text.

相关扩展
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.


 * – 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.