Item1224: Underscores in topic name with WebTopicCreator are not possible
Priority: Urgent
Current State: Closed
Released In: 1.1.0
Target Release: minor
Applies To: Engine
Component:
Branches:
TWiki bug topic:
Item6209 (
src -
history )
--
You cannot create topics with underscores in the names like Foo_Bar_Fooo with
WebCreateTopic..even if you check "AllowNoWikiWord"...while you later still can rename it to have this name.
Seems like its simpy a JS validation problem, which does not respect the checkbox and simply converts the name to a
WikiWord all the time
--
EugenMayer - 09 Mar 2009
This has just been reported again as
Item9195
There's some rather over-enthusiastic Javascript at work.
This is really crap; confirmed, and raised to Urgent status for 1.1 release.
--
CrawfordCurrie - 25 Jun 2010
Yes - this has come up multiple times in support questions as well. The
JavaScript validations ought to match the same transform that is done by core when converting a bracketed spaced link into a valid topic name, allowing underscores, and some other limited punctuation permitted by core. It should also pick up
$Foswiki::cfg{NameFilter}
so that local preferences are uniformly enforced.
--
GeorgeClark - 26 Jun 2010
I've added a new PREFERENCE variable NAMEFILTER which copies the cfg{NameFilter} regex and passes it through EXPORTEDPREFERENCES to javascript. Added a new function filterPunctuation in addition to removePunctuation and changed webtopiccreator.js to follow the same rules as Render.pm. If the allow non-WikiWord checkbox is checked, then it Converts filtered punctuation to spaces, then remove spaces capitalizing the following letters to build a wiki word. If allow nonWikiWord is not checked, then the spaces and punctuation are all stripped as before.
I found one issue probably with our defaults.
NameFilter default does not include #. But # is interpreted as an anchor and the Topic name is always truncated prior to the #. So we should probably add # to the
NameFilter regex by default.
--
GeorgeClark - 29 Jun 2010
So...how would I access those changes you've made and incorporate them back into my site?
--
RobertWall - 30 Jun 2010
The changes are all listed at the bottom of this page, and can be reached by clicking on the "checkins". Unfortunately the changes are based upon other changes to version 1.1 of Foswiki and would need quite a bit of rework to fit them onto 1.0.9. 1.1 is getting close to a beta release.
--
GeorgeClark - 02 Jul 2010