Extension:NamespaceHTML/ja
<translate> Warning:</translate> <translate> The code or configuration described here poses a major security risk.</translate> <translate> Site administrators:</translate> <translate> You are advised against using it until this security issue is resolved.</translate> <translate> Problem:</translate> Namespace detection code can be tricked allowing raw html to be unsafely executed. This is possible even for attackers who do not have any edit rights. Bawolff (talk) 04:17, 13 February 2023 (UTC) <translate> Solution:</translate> Use a different extension like extension:Widgets Bawolff (talk) 04:17, 13 February 2023 (UTC) |
A request to archive this extension has been made on Phabricator. See <translate> task <tvar name=1>T360235</tvar></translate> for the archival request and the rationale for the request, and to leave comments about the request. |
<translate> This extension is currently not actively maintained!</translate> <translate> Although it may still work, any bug reports or feature requests will more than likely be ignored.</translate> <translate> If you are interested in taking on the task of developing and maintaining this extension, [[<tvar name=request>Special:MyLanguage/Gerrit/Privilege policy#Requesting Gerrit privileges</tvar>|you can request repository ownership]].</translate> <translate> As a courtesy, you may want to contact the author.</translate> <translate> You should also remove this template and list yourself as maintaining the extension in the page's <tvar name=extension>{{Extension }}</tvar> infobox.</translate> |
NamespaceHTML リリースの状態: 保守されていない |
|
---|---|
実装 | タグ |
説明 | Allows raw HTML in specified namespaces |
作者 | Ike Hecht (tosfostalk) |
最新バージョン | 0.4 () |
互換性の方針 | 長期間サポート リリースであるすべての MediaWiki リリースについて、拡張機能に対応するブランチが存在します。 |
MediaWiki | 1.35, 1.39 |
データベースの変更 | いいえ |
ライセンス | GNU 一般公衆利用許諾書 2.0 以降 |
ダウンロード | |
$wgRawHtmlNamespaces |
|
<html> |
|
Quarterly downloads | Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin'). |
Public wikis using | Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin'). |
translatewiki.net で翻訳を利用できる場合は、NamespaceHTML 拡張機能の翻訳にご協力ください | |
問題点 | 未解決のタスク · バグを報告 |
The NamespaceHTML extension allows raw HTML in specified namespaces. It is intended to work just like the $wgRawHtml setting. The difference is that this extension allows specifying which namespace(s) should be able to contain raw HTML, which allows administrators to restrict raw HTML to namespaces with sufficient edit protections.
This extension was created for WikiWorks.
使用法
Embed raw html within <html>...</html>
tags.
See Manual:$wgRawHtml for more information.
As a template
The extension allows inclusion from namespaces where HTML is allowed to namespaces where HTML is not. You can create a custom script namespace and allow HTML in that namespace. Then you can create pages in the script namespace that contain safe scripts which can be transcluded into any page.
Technically, you can use the #tag parser function to pass parameters to the template. See here for an example. However, it is a better idea to use the Widgets extension for that.
Widget examples
- To add a Pinterest feed: Extension:NamespaceHTML/Pinterest Widget
インストール
- <translate> [[<tvar name=2>Special:ExtensionDistributor/NamespaceHTML/ja</tvar>|Download]] and move the extracted <tvar name=name>
NamespaceHTML/ja
</tvar> folder to your <tvar name=ext>extensions/
</tvar> directory.</translate>
<translate> Developers and code contributors should install the extension [[<tvar name=git>Special:MyLanguage/Download from Git</tvar>|from Git]] instead, using:</translate>cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/NamespaceHTML%2Fja - <translate> Add the following code at the bottom of your <tvar name=1>LocalSettings.php </tvar> file:</translate>
wfLoadExtension( 'NamespaceHTML/ja' );
- 必要に応じて設定します。
- File:OOjs UI icon lightbulb-yellow.svg <translate> Note:</translate>
$wgRawHtmlNamespaces = [];
must be configured, see below. - File:OOjs UI icon check-constructive.svg <translate> Done</translate> – <translate> Navigate to <tvar name=special>Special:Version</tvar> on your wiki to verify that the extension is successfully installed.</translate>
設定
- $wgRawHtmlNamespaces
- List of the namespaces where raw HTML should be enabled. See this page for more information about namespace constants. For example:
# allow raw HTML but only in the Project: & User: namespaces $wgRawHtmlNamespaces = [ NS_PROJECT, NS_USER ];
関連項目
- HTML restriction - list of extensions that allow for the inclusion of raw HTML
- Extension:Secure HTML - adds "secret key" protection for html sections
- Extension:SaferHTMLTag - allows only sysops and certain user groups to edit pages containing the
<html>
tag - Extension:HTMLets - Serves HTML from server files