GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Main page
  • Get MediaWiki
  • Get extensions
  • Tech blog
  • Contribute
  • User help
  • FAQ
  • Technical manual
  • Support desk
  • Communication
  • Developer portal
  • Code statistics
  • Community portal
  • Recent changes

This view

  • Original page
  • New address

GeezerVison is showing www.mediawiki.org — Manual:Pre-save transforms - MediaWiki

(Redirected from Pre-save transforms)

Pre-save transforms (PST) are transformations which are applied to the content before it is even saved. They are implemented in the function preSaveTransform() of the ContentTransformer class. (ContentTransformer::preSaveTransform())

Wikitext

For Wikitext content , the parser ’s preSaveTransform() applies the following transformations, in order:

Null characters
Null characters are removed.
Trailing whitespace
Whitespace (according to PHP's rtrim()) at the end of the text is removed.
Line endings
Line endings \r\n as well as \r are normalized to \n.
Substitutions
{{subst:template name|template parameters}}
Signatures
~~~, ~~~~ and ~~~~~ − Note that this order has the nontrivial effect of not allowing template substitutions within a signature.
Pipe trick
[[phabricator:T1|]] becomes [[phabricator:T1|T1]]
[[title (topic)|]] becomes [[title (topic)|title]]

JSON

JsonContent::preSaveTransform() applies the following transformations, in order:

Beautify JSON
standardizes the formatting (“pretty”, i. e. split across lines and indented)
Line endings
Line endings \r\n as well as \r are normalized to \n.

See also

  • Manual:ContentTransformer:preSaveTransform()
  • Pre-save transforms on the Parser:
    • Parser::preSaveTransform()
    • Manual:Hooks/ParserPreSaveTransformComplete
Retrieved from "https://www.mediawiki.org/w/index.php?title=Manual:Pre-save_transforms&oldid=7865255"
Categories:
  • Edit
  • Pre-save transform
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.