Difference between revisions of "Template:ReplaceNumericCharEncoding"

From ChatWars Wiki
Jump to: navigation, search
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{#vardefine: a | 0 }}{{#while:  
+
<includeonly>{{#vardefine: string | {{{string|}}} }}{{#vardefine: continue | true }}{{#while:  
              | {{#ifexpr: {{#var: a}} = 0 | true }}
+
              | {{#var: continue}}
               | {{#if: {{#pos: {{{string|}}} | &#39; }}
+
               | {{#if: {{#pos: {{#var: string}} | &#39; }}
                   | {{#sub: {{{string|}}} | 0 | {{#pos: {{{string|}}} | &#39; }} }}'{{#sub: {{{string|}}} | {{#expr: {{#pos: {{{string|}}} | &#39; }} + 5}} }}
+
                   | {{#vardefine: string | {{#sub: {{#var: string}} | 0 | {{#pos: {{#var: string}} | &#39; }} }}'{{#sub: {{#var: string}} | {{#expr: {{#pos: {{#var: string}} | &#39; }} + 5}} }} }}
                   | {{#if: {{#pos: {{{string|}}} | &#x0027; }}
+
                   | {{#if: {{#pos: {{#var: string}} | &#x0027; }}
                       | {{#sub: {{{string|}}} | 0 | {{#pos: {{{string|}}} | &#x0027; }} }}'{{#sub: {{{string|}}} | {{#expr: {{#pos: {{{string|}}} | &#x0027; }} + 8}} }}
+
                       | {{#vardefine: string | {{#sub: {{#var: string}} | 0 | {{#pos: {{#var: string}} | &#x0027; }} }}'{{#sub: {{#var: string}} | {{#expr: {{#pos: {{#var: string}} | &#x0027; }} + 8}} }} }}
                       | {{#if: {{#pos: {{{string|}}} | &gt; }}
+
                       | {{#if: {{#pos: {{#var: string}} | &gt; }}
                           | {{#sub: {{{string|}}} | 0 | {{#pos: {{{string|}}} | &gt; }} }}>{{#sub: {{{string|}}} | {{#expr: {{#pos: {{{string|}}} | &gt; }} + 4}} }}
+
                           | {{#vardefine: string | {{#sub: {{#var: string}} | 0 | {{#pos: {{#var: string}} | &gt; }} }}>{{#sub: {{#var: string}} | {{#expr: {{#pos: {{#var: string}} | &gt; }} + 4}} }} }}
                           | {{{string|}}}{{#vardefine: a | 1 }}
+
                           | {{#vardefine: continue|}}{{#var: string}}
 
                         }}
 
                         }}
 
                     }}
 
                     }}
 
                 }}
 
                 }}
             }}
+
             }}</includeonly><!--
</includeonly><!--
 
 
--><noinclude>
 
--><noinclude>
 
This template has the sole purpose to replace numeric char encoding (<code><nowiki>&#39 ;</nowiki></code> (decimal encoding) AND <code><nowiki>&#x0027 ;</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>&#39 ;</nowiki></code> (decimal encoding) AND <code><nowiki>&#x0027 ;</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 20:03, 20 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