Difference between revisions of "Template:ReplaceNumericCharEncoding"

From ChatWars Wiki
Jump to: navigation, search
(fixed a bug with hexadecimal encoding replacement)
Line 2: Line 2:
 
               | {{#sub: {{{string|}}} | 0 | {{#pos: {{{string|}}} | ' }} }}'{{#sub: {{{string|}}} | {{#expr: {{#pos: {{{string|}}} | ' }} + 5}} }}
 
               | {{#sub: {{{string|}}} | 0 | {{#pos: {{{string|}}} | ' }} }}'{{#sub: {{{string|}}} | {{#expr: {{#pos: {{{string|}}} | ' }} + 5}} }}
 
               | {{#if: {{#pos: {{{string|}}} | ' }}
 
               | {{#if: {{#pos: {{{string|}}} | ' }}
                   | {{#sub: {{{string|}}} | 0 | {{#pos: {{{string|}}} | ' }} }}'{{#sub: {{{string|}}} | {{#expr: {{#pos: {{{string|}}} | ' }} + 5}} }}
+
                   | {{#sub: {{{string|}}} | 0 | {{#pos: {{{string|}}} | ' }} }}'{{#sub: {{{string|}}} | {{#expr: {{#pos: {{{string|}}} | ' }} + 8}} }}
 
                   | {{{string|}}}
 
                   | {{{string|}}}
 
                 }}
 
                 }}

Revision as of 13:12, 8 January 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