Category:Input Sanitisers: Difference between revisions
Appearance
AndrewSayers (talk | contribs) Created page with "Templates that convert user input to standard representations (e.g. <kbd>yes</kbd> -> <kbd>1</kbd> or <kbd>pT-Br</kbd> -> <kbd>pt_BR</kbd>)." |
AndrewSayers (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
Templates that convert user input to standard representations (e.g. <kbd>yes</kbd> -> <kbd>1</kbd> or <kbd>pT-Br</kbd> -> <kbd>pt_BR</kbd>). | Templates that convert user input to standard representations (e.g. <kbd>yes</kbd> -> <kbd>1</kbd> or <kbd>pT-Br</kbd> -> <kbd>pt_BR</kbd>). | ||
Sanitisers should convert unknown values to blank strings. Calling pages can then do: | |||
<pre><nowiki>{{#ifeq:{{SanitiseType|value}}||(handle unknown case)|(handle known case)}}</nowiki></pre> |
Latest revision as of 15:43, 7 September 2025
Templates that convert user input to standard representations (e.g. yes -> 1 or pT-Br -> pt_BR).
Sanitisers should convert unknown values to blank strings. Calling pages can then do:
{{#ifeq:{{SanitiseType|value}}||(handle unknown case)|(handle known case)}}
Pages in category "Input Sanitisers"
The following 2 pages are in this category, out of 2 total.