在 mediawiki 中关闭 html 处理

Turn off html processing in mediawiki

我想关闭 mediawiki 中 link 的内置 html 处理。例如,我想通过添加带有问号和等号(即 Special:CustomNeed?page_title=Name+with+spaces)的 link 来编辑边栏 (MediaWiki:Sidebar),但处​​理过程将 link 打断为以下内容:Special:CustomNeed%3Fpage_title%3DName%2Bwith%2Bspaces。这样,link 就不起作用了。

阅读 this question 后,我认为有一种方法可以关闭处理,但是,我不知道 如何。我是否必须 add/edit LocalSettings.php 中的内容?

您可以通过在 LocalSettings.php 中设置 $wgRawHtml = true; 来做到这一点:

然后,您将能够在 <html></html> 标签内添加 html 链接(或任何您不需要的代码)。

请记住,如果您的 wiki 是 public,这可能很危险,因为人们可以在那里插入他们想要的任何 javascript 代码。

阅读更多here

您不能为内部链接指定查询参数,因此请改用完整网址:http://example.com/wiki/Special:CustomNeed?page_title=Name+with+spaces

详情见Manual:Interface/Sidebar