HTML の制限

This page is a translated version of the page HTML restriction and the translation is 60% complete.

MediaWiki は既定で HTML の使用を制限します。 一部の HTML 要素と属性のみが許可されています。 「html」タグで囲まれた生の HTML 節は、構成パラメーター $wgRawHtml を使用して有効にできます。 コードは includes/parser/Sanitizer.php にあります。

ウィキメディアのウェブサイト群 (完全なリストはこちらをご覧ください) では、HTML の完全な使用は許可されていません。 HTML の完全な使用を許可するための申請は2005年に却下されました。

生の HTML を含められるようにする拡張機能がいくつかあります。 安全と思われる拡張機能を以下に示します:

Extension Status Description
Extension:HTMLets unmaintained allows pre-defined HTML snippets with $wgRawHtml = false;
Extension:HTML Tags stable allows for adding HTML from a set of tags and attributes defined in the wiki's settings
Extension:Secure HTML unmaintained adds 'Secret key' protection for html sections
Extension:SaferHTMLTag stable, has known security vulnerability prevents editing of pages that contain the ‎‎<html> tag by unauthorized users and groups
Extension:HTMLPurifier beta allows users to input raw HTML by using HTML Purifier to sanitize it
Extension:Widgets stable allows for defining HTML- and JavaScript-based "widgets", with optional parameters