WebTopicCreator is not stripping such characters as comma, exclamation points, periods, etc. If one enters "Last, First", it will change it to "Last,First".
Perhaps this is related to the change made in response to
Item1595?
It looks like the isWikiWord check is not kicking in when the checkmark is not set.
When it kicks in it will need to be updated for
I18N support - a version with better support for
I18N topic names could look something like this:
function isWikiWord(inValue) {
var upperAlphaRegex = "[ÀÈÌÒÙÁÉÍÓÚÝÂÊÎÔÛÃÑÕÄËÏÖܾ¾Ç¼ØÅÆþÐA-Z]";
var lowerAlphaRegex = "[àèìòùáéíóúýâêîôûãñõäëïöü½ßøÞåæðça-z]";
var numericRegex = "[\d]";
var mixedAlphaRegex = "[ÀÈÌÒÙàèìòùÁÉÍÓÚÝáéíóúýÂÊÎÔÛâêîôûÃÑÕãñõÄËÏÖܾäëïöü¾çǼ½ßØøÅ寿ÞþÐð\w]";
var mixedAlphaNumRegex = "[ÀÈÌÒÙàèìòùÁÉÍÓÚÝáéíóúýÂÊÎÔÛâêîôûÃÑÕãñõÄËÏÖܾäëïöü¾çǼ½ßØøÅ寿ÞþÐð\w\d]";
var wikiWordRegex = "\\b" + upperAlphaRegex + "+" + lowerAlphaRegex + "+" + upperAlphaRegex + "+" + mixedAlphaNumRegex + "*";
var re = new RegExp(wikiWordRegex);
return (inValue.match(re)) ? true : false;
}
\w
seems to litterally mean a-zA-Z in javascript, so chars need to be mentioned explicitly (or?).
--
SP
- Added above regexes
- Added check for empty name
- Strips illegal characters
- Added feedback field
- Refactored javascript
AC
Very nice update Arthur! - Minor update: Removed a bit of UTF8 formatting from twiki.js and made it possible for first char of wikiword to be a i18n-char.
--
SP
I fixed a problem with illegal characters - instead it uses a list of allowed characters now. Don't know how this will hold with foreign languages though.
Steffen: I am having problems reading your commit: everything is garbled. Had to undo your last changes (partly), so please review/redo them.
AC
Sorry for all of this charset conversion back and forth .. hope one day javascript will catch up with the wonders of UTF8 on mac
--
SP
Converted special chars to unicode escape sequence (\uXXXX).
AC
Fixed a bug:
boolean()
to
toBoolean()
.
AC
I have found a few additions:
- http://www.fileformat.info/info/unicode/category/index.htm
lists unicode character categories, of which Uppercase
and Lowercase
are useful (except for mathematical characters and such).
- I have added these characters to the regexes, but because
twiki.js
would get too big, I have removed them to a separate file: unicode_chars.js
- Javascript has
toLocaleUpperCase
and toLocaleLowerCase
to support international characters when doing case conversion.
- The input form field should get focus at page load.
Commited these changes.
AC
Excellent additions, thanks!
--
SP