Sorry I'm going to bother you again: :-)
Why undersores appear? Wikisoftware generates them itself. Users indeed look and copy from the location bar. That's what it was invented for. Overkill? Translating 1 character to another is about the simpliest and fastest CPU-operation one can imagine: 1 table lookup, that's 2 or 3 clockcycles for an indexed MOVE operation in assembly! If you find it no problem to apply this rule at the input:
' ' --> '_'
what then is the problem with translating it back again?:
'_' --> ' '
Am I missing something? Users are not to blame for underscores. The software design is to blame: you choose that the name of the article HAD to be 'nicely' visible in the URL, and that 's maybe the 'error'. Adding 1-cpu cycle to the code is better than keeping correcting users forever.
Hope this doesn't sound too ... how does one say in English... too harsh maybe?.... It's just to get it clear for myself. Am I really missing something here?
Thanks, Pieter
Brion Vibber wrote:
On lun, 2003-01-27 at 14:20, Erik Moeller wrote:
I've seen this a lot: People write links [[like_this]]. Does anyone have an idea what makes them do this? Is there anything in the way articles are displayed that suggests underscores should be used? Are that many people looking at the browser's status bar, where the underscores are visible?
Probably. Also, some automatically created links (moved pages, usemod-era subpage links) have underscores in them.
Can we do anything to prevent this?
Tell them "don't do that"? It seems overkill to automatically filter input looking for links and replacing underscores with spaces.
-- brion vibber (brion @ pobox.com)
Name: signature.asc
signature.asc Type: application/pgp-signature Description: This is a digitally signed message part