Description

Links that contain multiple spaces where there original page name contains only a single space point to the original page, but display as links to nonexisting pages.

Steps to reproduce

  1. create a link to a page with a space in the name
  2. create a second link, only with two spaces in place of single one
  3. click the first link and create the page
  4. come back and see only one link changed color

Example

http://test.wikiwikiweb.de/WikiSandBox

["some link with spaces"]
["some  link  with  spaces"]

Component selection

Details

MoinMoin Version

1.3, 1.5.x, 1.6

OS and Version

Python Version

Server Setup

Server Details

Language you are using the wiki in (set in the browser/UserPreferences)

Workaround

Don't create links with multiple spaces in them.

Discussion

Not sure what would be the correct behavior -- fix the page existence checking to collapse multiple spaces, or the page creation procedure to not collapse them.


You can not create pages with more than one space between words. The system normalize all names by separating the words using whitespace, then assembling the name again by adding one space between each word. It works like this because using more than one space is 99% of the time a typing error, and the rest an evil user trying to annoy others, for example creating the page "Foo  Bar" while there is a "Foo Bar" page. Both names are rendered exactly the same as "Foo Bar" because whitespace is normalized by browsers.

So practically, all these pages point to the same page:

For more info check PageNames.

It seems that the fix will be to normalize also the name of the page when creating a page link, so when you create the link ["Page  Name"] it will be rendered as Page Name. This can fixed in the parser or the formatter.

I think we should not "fix" that. The links with multiple spaces are wrong, so it is not bad when they are rendered as they point to nonexisting pages. If we "fix" that, the user would not notice that he made a wrong link. See it as a feature. :)


Ok, then why not just render them as normal text and not links, if they are wrong (or whatever approach MoinMoin uses to indicate illegal links)? Or make them point to some kind of "invalid page name" error page, with an explanation? The way it is now it's just a wrong "error" reported, and the thing is very confusing. It took me a while to realize the problem was with spaces -- and it's only because I looked at the actual URLs the links pointed to. I doubt a "normal" user does that.

Anything that would make the links "not work" would be good, actually. I have this particular use case (yes, it's wrong, no, I don't thnk I will be able to explain it to that user). The names were changed, note the tabs:

 * ["John       Doe     316806"]                
 * ["Mark       Twain   316809"]                
 * ["Bob        Brown   316811"]                
 * ["John       Smith   316820"]                

Plan


CategoryMoinMoinBug

MoinMoin: MoinMoinBugs/MultipleSpacesInLinksNonexistentPage (last edited 2007-10-29 19:06:51 by localhost)