Item10143: webtopiccreator.js only removes first space

Priority: Urgent
Current State: Closed
Released In: 1.1.3
Target Release: patch
Applies To: Engine
Component: webtopiccreator.js
Reported By: KiltBear
Waiting For:
Last Change By: KennethLavrsen

I find that when using WebCreateNewTopic in any web it seems the script that cleans up names automatically is no longer functioning correctly. I am assuming that this is a problem with webtopiccreator.js

If I type in this is a test name the feedback says Topic will be named:ThisIs A Test Name

Now very interestingly, if I remove focus from the Topic name input field, it will remove the next space in the proposed new name AND change what is in the data entry box. You can easily see the behavior by typing in something similar to my example and then change focus back and forth between the Topic name text box and the Topic parent text box.

This works okay on 1.0.10, and I see that the javascript file has changed significantly.

Attached is a movie that shows the problem in action.

-- KiltBear - 09 Dec 2010

Arthur - I believe this is your baby. Can you provide a fix for this?

I have no skills in JS to see what is wrong. I can see the major change was to start using JQuery. It seems it may not do the job we need.

-- KennethLavrsen - 11 Dec 2010

I have changed the replace regex from:

finalName = finalName.replace(/\s+/, '', 'g');


finalName = finalName.replace(/\s+/g, '');

Modifiers can be passed as parameter only with new RegExp: myregexp = new RegExp(regexstring, "gims").

-- ArthurClemens - 12 Dec 2010

Thanks folks, I made that one regex change and I'm looking good.

-- KiltBear - 29 Jan 2011

ItemTemplate edit

Summary webtopiccreator.js only removes first space
ReportedBy KiltBear
Codebase 1.1.2
SVN Range
AppliesTo Engine
Component webtopiccreator.js
Priority Urgent
CurrentState Closed
Checkins distro:c240bd2f37c4 distro:cbaaf9299b63 distro:601786c95a09
TargetRelease patch
ReleasedIn 1.1.3
Topic attachments
I Attachment Action Size Date Who Comment
ScreenRecordingTrim.movmov manage 4 MB 10 Dec 2010 - 00:15 KiltBear  
Topic revision: r9 - 16 Apr 2011, KennethLavrsen - This page was cached on 15 Jan 2020 - 20:04.

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