Difference between revisions of "Template:ReplaceNumericCharEncoding"
(updated to a more easily extendable system) |
|||
(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | <includeonly> | + | <includeonly>{{#vardefine: string | {{{string|}}} }}{{#vardefine: continue | true }}{{#while: |
− | + | | {{#var: continue}} | |
− | + | | {{#if: {{#pos: {{#var: string}} | ' }} | |
− | + | | {{#vardefine: string | {{#sub: {{#var: string}} | 0 | {{#pos: {{#var: string}} | ' }} }}'{{#sub: {{#var: string}} | {{#expr: {{#pos: {{#var: string}} | ' }} + 5}} }} }} | |
− | + | | {{#if: {{#pos: {{#var: string}} | ' }} | |
+ | | {{#vardefine: string | {{#sub: {{#var: string}} | 0 | {{#pos: {{#var: string}} | ' }} }}'{{#sub: {{#var: string}} | {{#expr: {{#pos: {{#var: string}} | ' }} + 8}} }} }} | ||
+ | | {{#if: {{#pos: {{#var: string}} | > }} | ||
+ | | {{#vardefine: string | {{#sub: {{#var: string}} | 0 | {{#pos: {{#var: string}} | > }} }}>{{#sub: {{#var: string}} | {{#expr: {{#pos: {{#var: string}} | > }} + 4}} }} }} | ||
+ | | {{#vardefine: continue|}}{{#var: string}} | ||
+ | }} | ||
+ | }} | ||
}} | }} | ||
− | + | }}</includeonly><!-- | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | }}</includeonly><!-- | ||
--><noinclude> | --><noinclude> | ||
This template has the sole purpose to replace numeric char encoding (<code><nowiki>' ;</nowiki></code> (decimal encoding) AND <code><nowiki>' ;</nowiki></code> (hexadecimal encoding) ) with the actual character ("<code>'</code>") to circumvent a bug in mediawiki which makes queries for pagename break | This template has the sole purpose to replace numeric char encoding (<code><nowiki>' ;</nowiki></code> (decimal encoding) AND <code><nowiki>' ;</nowiki></code> (hexadecimal encoding) ) with the actual character ("<code>'</code>") to circumvent a bug in mediawiki which makes queries for pagename break | ||
[[Category:Template]] | [[Category:Template]] | ||
</noinclude> | </noinclude> |
Latest revision as of 21:03, 20 March 2019
This template has the sole purpose to replace numeric char encoding (' ;
(decimal encoding) AND ' ;
(hexadecimal encoding) ) with the actual character ("'
") to circumvent a bug in mediawiki which makes queries for pagename break