Βοήθεια:Πρότυπο
Escape template-breaking characters
[επεξεργασία]There are some characters that, if used inside a template, will break its output: most frequently this happens with =
(the equal sign) and |
(the pipe sign).
The easiest and most effective solutions to this problem are:
- Using numbered parameters like in:
<pre<noinclude></noinclude>>{{Note|1=This method is effective only with = and is very useful with query strings in URLs, e.g. https://www.archlinux.org/?foo=bar}}</pre<noinclude></noinclude>>
- Replacing the offending characters with their respective HTML entities, like in:
<pre<noinclude></noinclude>>{{Note|This method supports all kinds of characters, including =, | and }} ( https://www.archlinux.org/?foo=bar )}}</pre<noinclude></noinclude>>
- Enclosing the offending characters in <nowiki> tags, like in:
<pre<noinclude></noinclude>>{{Note|<nowiki>This method displays all kinds of characters ( = | }} ), but completely prevents the wiki engine from processing text markup, like links ( https://www.archlinux.org/ ) and other templates ( {{ic|foo}} ).</nowiki>}}</pre<noinclude></noinclude>>