Difference between revisions of "Template:ReplaceNumericCharEncoding"

From ChatWars Wiki
Jump to: navigation, search
(updated to a more easily extendable system)
Line 1: Line 1:
<includeonly><!--{{#if: {{#pos: {{{string|}}} | &#39; }}
+
<includeonly>{{#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}} }}
 
               | {{#if: {{#pos: {{{string|}}} | &#x0027; }}
 
               | {{#if: {{#pos: {{{string|}}} | &#x0027; }}
Line 6: Line 6:
 
                 }}
 
                 }}
 
             }}
 
             }}
-->{{#switch: {{{string|}}}
+
<!--{{#switch: {{{string|}}}
 
   | &#39; = {{#sub: {{{string|}}} | 0 | {{#pos: {{{string|}}} | &#39; }} }}'{{#sub: {{{string|}}} | {{#expr: {{#pos: {{{string|}}} | &#39; }} + 5}} }}
 
   | &#39; = {{#sub: {{{string|}}} | 0 | {{#pos: {{{string|}}} | &#39; }} }}'{{#sub: {{{string|}}} | {{#expr: {{#pos: {{{string|}}} | &#39; }} + 5}} }}
 
   | &#x0027; = {{#sub: {{{string|}}} | 0 | {{#pos: {{{string|}}} | &#x0027; }} }}'{{#sub: {{{string|}}} | {{#expr: {{#pos: {{{string|}}} | &#x0027; }} + 8}} }}
 
   | &#x0027; = {{#sub: {{{string|}}} | 0 | {{#pos: {{{string|}}} | &#x0027; }} }}'{{#sub: {{{string|}}} | {{#expr: {{#pos: {{{string|}}} | &#x0027; }} + 8}} }}
Line 12: Line 12:
 
   | #default = {{{string|}}}
 
   | #default = {{{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>

Revision as of 20:57, 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