You are here: Foswiki>Tasks Web>Item929 (15 Mar 2011, GeorgeClark)Edit Attach

Item929: topic names with %20 not "not found" when they don't exist

Priority: Normal
Current State: Confirmed
Released In: n/a
Target Release:
Applies To: Engine
Component: UrlHandling
Reported By: WillNorris
Waiting For:
Last Change By: GeorgeClark
compare (good, exists)

vs. (good, doesn't exist, and reports error)

vs. (bad, doesn't exist, and doesn't report error---goes to Sandbox)

-- WillNorris - 31 Jan 2009

I tried this on my local machine by typing http://daphne/foswiki/trunk/core/bin/view/Sandbox/Test%20Twenty into the browser bar. As Will says, it takes you painlessly to the webhome of that web. The browser bar changed to http://daphne/foswiki/trunk/core/bin/view/Sandbox/Test Twenty


-- CrawfordCurrie - 05 Feb 2009

Do we officially support topic names with spaces?

(question asked to decide if this is really urgent. I can think of many garbage URLs we can give Foswiki that gives garbage in return)

-- KennethLavrsen - 06 Feb 2009

I don't think so, since Foswiki::isValidTopicName returns false to topics containing spaces, but I think it's nice to support it (so we need a feature request, spec review, ...)

-- GilmarSantosJr - 06 Feb 2009

No. isValidTopicName checks a pair of topicNameRegex which in turn uses wikiwordRegex. Nowhere do we state that that regex must not contain spaces. This not only excludes spaces, it also excludes non-\w characters.

It would be nice to support topic names with spaces. It would be nicer to support attachment names with spaces first.

Regrading to Normal. The behaviour could be improved, but it's not a blocker.

-- CrawfordCurrie - 07 Feb 2009

The issue is that the Web/Topic validation - when it finds an invalid topic, it returns an empty string. A missing topic is then substituted with WebHome. Similar is done with the Web component, but a missing web becomes Main. This is part of automatically sending the user to Main/WebHome or <Someweb/WebHome> with a partial URL.

-- GeorgeClark - 15 Mar 2011

ItemTemplate edit

Summary topic names with %20 not "not found" when they don't exist
ReportedBy WillNorris
SVN Range SVN 2279: Foswiki-1.0.0, Sat, 31 Jan 2009, build 2271
AppliesTo Engine
Component UrlHandling
Priority Normal
CurrentState Confirmed
ReleasedIn n/a
Topic revision: r10 - 15 Mar 2011, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy