do not remove leading special chars

According to Mozilla docu only [^A-Za-z0-9_] is considered
a Word character - yeah :-(
This commit is contained in:
Thomas Lübking 2013-01-26 20:53:37 +01:00
parent 862b35dcc8
commit 0ac1950ddc

View file

@ -98,7 +98,7 @@ function isBrowser(appName) {
ret = ret.replace("[modified]", "❖");
// in general, remove leading [and trailing] blanks and special chars
ret = ret.replace(/^\W*/, '');
// ret = ret.replace(/^\W*/, ''); - this does not work - Umlauts and pot. other chars are considered "non Word"
ret = ret.replace(/^\s*/, '').replace(/\s*$/, '');
return ret;
})