Difference between revisions of "Template:ReplaceNumericCharEncoding"

From ChatWars Wiki
Jump to: navigation, search
Line 1: Line 1:
<includeonly>{{#vardefine: a | 1 }}{{#while:  
+
<includeonly>{{#vardefine: a | 0 }}{{#while:  
               | {{#ifexpr: {{#var: a}} != 0 | true }}
+
               | {{#ifexpr: {{#var: a}} = 0 | true }}
 
               | {{#if: {{#pos: {{{string|}}} | &#39; }}
 
               | {{#if: {{#pos: {{{string|}}} | &#39; }}
 
                   | {{#sub: {{{string|}}} | 0 | {{#pos: {{{string|}}} | &#39; }} }}'{{#sub: {{{string|}}} | {{#expr: {{#pos: {{{string|}}} | &#39; }} + 5}} }}
 
                   | {{#sub: {{{string|}}} | 0 | {{#pos: {{{string|}}} | &#39; }} }}'{{#sub: {{{string|}}} | {{#expr: {{#pos: {{{string|}}} | &#39; }} + 5}} }}
Line 7: Line 7:
 
                       | {{#if: {{#pos: {{{string|}}} | &gt; }}
 
                       | {{#if: {{#pos: {{{string|}}} | &gt; }}
 
                           | {{#sub: {{{string|}}} | 0 | {{#pos: {{{string|}}} | &gt; }} }}>{{#sub: {{{string|}}} | {{#expr: {{#pos: {{{string|}}} | &gt; }} + 4}} }}
 
                           | {{#sub: {{{string|}}} | 0 | {{#pos: {{{string|}}} | &gt; }} }}>{{#sub: {{{string|}}} | {{#expr: {{#pos: {{{string|}}} | &gt; }} + 4}} }}
                           | {{{string|}}}{{#vardefine: a | 0 }}
+
                           | {{{string|}}}{{#vardefine: a | 1 }}
 
                         }}
 
                         }}
 
                     }}
 
                     }}

Revision as of 21:22, 19 March 2019

This template has the sole purpose to replace numeric char encoding (&#39 ; (decimal encoding) AND &#x0027 ; (hexadecimal encoding) ) with the actual character ("'") to circumvent a bug in mediawiki which makes queries for pagename break