Item10143: webtopiccreator.js only removes first space
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
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
Attached is a movie that shows the problem in action.
- 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.
- 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
myregexp = new RegExp(regexstring, "gims")
- 12 Dec 2010
Thanks folks, I made that one regex change and I'm looking good.
- 29 Jan 2011