Items in tsunami all have names. However, since names change, the URL will almost always have a number near/at the end. This is because it is completely unacceptable for URLs to break. Completely. Unacceptable.
If a better solution can be found, do note it. Otherwise, the current scheme will be adhered to.
will get lost when I move to ASP.NET MVC
Item names in tsunami have a few restrictions. This is due to the nature of characters allowed in URLs, by ASP.NET. These restrictions can be enforced two ways: limit characters allowed in item names, or remove/replace the restricted characters so that they do not show up in item URLs.
The below covers all character codes from 0 through 255.
- character codes < 32
- character codes >= 127
- banned by UrlScan (periods are too by default, but that was changed for tsunami)
# (when escaped as %23)
- used for bookmarks; ASP.NET does not parse the path correctly when it is used in a folder (it appears to calculate the folder depth by the position of the %23 and not by the file name, which causes "~/" to render with one or more too few "../".
- ASP.NET responds with HTTP 400 Bad Request
- ASP.NET responds with ArgumentException "Illegal characters in path."
- spaces are converted to underscores, so underscores shouldn't be used
- converted to underscore for URLs
- reserved, as in they have special meanings in certain contexts
characters were categorized according to the Percent-encoding
characters were tested to be OK, but may not be good to use as they apparently don't follow the URI spec. ASP.NET rest
characters are restricted due to ASP.NET/URLScan even though the spec seems to allow them.
wiki legal xx x-x x-x x x-x x
wiki reserve x xxxxxxxxxx x - xx x xx - x x -
exp. legal x x xxx xxxx x-x x x xx-xx xxxxx-xx xx
exp. illegal xx xx x x - x x xx - x - x
questionable - - x x - x x
ASP.NET rest x xx x x - x x - -
Created from URL Grammar code