Extension:NamespaceHTML
警告: ここで記述しているコードまたは設定には、セキュリティ上の重大なリスクがあります。 サイトの管理者へ: このセキュリティ上の問題が解決されるまで、これを使用しないように勧告します。 問題点: 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) 解決法: 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 タスク T360235 for the archival request and the rationale for the request, and to leave comments about the request. |
現在、この拡張機能は積極的な保守が行われていません! それでも機能する可能性はありますが、バグ報告や機能の要望は無視される可能性が高くなります。 この拡張機能の開発や保守の作業を引き受けることに興味がある場合は、リポジトリの所有権を申請できます。 礼儀として、作者に問い合わせることをお勧めします。 保守を引き継いだ場合、このテンプレートは除去すべきです。また、拡張機能ページの {{Extension }} 基礎情報ボックス内のリストにあなたの名前を保守担当者として追加してください。 |
NamespaceHTML リリースの状態: 保守されていない |
|
---|---|
実装 | タグ |
説明 | Allows raw HTML in specified namespaces |
作者 | Ike Hecht (tosfosトーク) |
最新バージョン | 0.4 () |
互換性の方針 | 長期間サポート リリースであるすべての MediaWiki リリースについて、拡張機能に対応するブランチが存在します。 |
MediaWiki | 1.35, 1.39 |
データベースの変更 | いいえ |
ライセンス | GNU 一般公衆利用許諾書 2.0 以降 |
ダウンロード | |
$wgRawHtmlNamespaces |
|
<html> |
|
Quarterly downloads | 2 (Ranked 142nd) |
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
インストール
- ダウンロードして、ファイルを
extensions/
フォルダー内のNamespaceHTML
という名前のディレクトリ内に配置します。
開発者とコード寄稿者は、上記の代わりに以下を使用してGitからインストールします:cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/NamespaceHTML - 以下のコードを LocalSettings.php ファイルの末尾に追加します:
wfLoadExtension( 'NamespaceHTML' );
- 必要に応じて設定します。
- 注:
$wgRawHtmlNamespaces = [];
must be configured, see below. - 完了 – ウィキの「Special:Version」に移動して、拡張機能が正しくインストールされたことを確認します。
設定
- $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