简体   繁体   中英

Turn off html processing in mediawiki

I want to turn off the built in html processing of links in mediawiki. For example, I want to edit the Sidebar (MediaWiki:Sidebar) by adding a link with question marks and equal signs (ie Special:CustomNeed?page_title=Name+with+spaces ), but the processing breaks the link to the following: Special:CustomNeed%3Fpage_title%3DName%2Bwith%2Bspaces . This way, the link doesn't work.

After reading this question , I thought there is a way to turn the processing off, however, I have no clue how . Do I have to add/edit something in the LocalSettings.php ?

You can't specify query parameters for internal links so use full URLs instead: http://example.com/wiki/Special:CustomNeed?page_title=Name+with+spaces

See Manual:Interface/Sidebar for details.

You can do that by setting $wgRawHtml = true; in LocalSettings.php :

Then, you will be able to add your html links (or any code you wan't) within <html></html> tags.

Please keep in mind that it can be dangerous if your wiki is public, because people can insert any javascript code they want there.

Read more here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM