Wikipedia:Canonicalization
From Free net encyclopedia
Note: Canonicalization is not the same as Canonization
Wiki canonicalization is the algorithm by which the text of links (in [single] or [[double]] pair of square brackets) is converted to a URI.
- Precede URIs with "http:", "ftp:", "gopher:", "mailto:", or "news:", with no pair of brackets, to create links automatically (this is not canonicalization). This includes links to .gif, .jpg, .jpeg or .png URIs; it does not display the image inline.
- A single pair of square brackets is for an in-line link to another site. For example, [http://www.wiktionary.org/] produces this: [1], while [http://www.wiktionary.org/ Wiktionary] produces this: Wiktionary.
- A double pair of square brackets creates an intra-wiki link, which is a link to a Wikipedia article. The special syntax [[wiktionary:verb]] allows you to link to an article on another Wiki (in this case, Wiktionary's entry for verb); see InterWiki. Use Interlanguage links to create the links at the top and bottom of articles that link to the same article in another language.
- Whitespace is converted to underscores (for example, the page "Star Trek" is actually located at "Star_Trek"). Multiple consecutive underscores and spaces are contracted to just one underscore.
- Leading or trailing whitespace/underscores are removed.
- Character references are replaced with their raw character (for example if you write "département" it will link to département).
- For Interwiki or Interlanguage Links, processing stops here. For other links:
- Illegal characters are stripped (such as ^)
- The first character is capitalised.
- If there is a namespace prefix (Talk:, Wikipedia:, User:, etc.), the first character of the article name (what comes after the colon) is also capitalised.
Example: [[ death in Vegas ]] creates a link to the page Death_in_Vegas , and appears as death in Vegas .
[edit]