[-] BO : BugFix : #PSTEST-428 : URL Rewriting and JS validation : now able to declare a hyphen

This commit is contained in:
vChabot
2012-01-12 09:24:57 +00:00
parent 37de18d5ef
commit 2b885d5dd4
+1 -1
View File
@@ -54,7 +54,7 @@ function str2url(str,encoding,ucfirst)
str = str.replace(/[\u0155]/g,'r');
str = str.replace(/[^a-z0-9\s\'\:\/\[\]-]\\u00A1-\\uFFFF/g,'');
str = str.replace(/[\u0028\u0029\u0021\u003F\u002E\u0026\u005E\u007E\u002B\u002D\u002A\u002F\u003A\u003B\u003C\u003D\u003E]/g,'');
str = str.replace(/[\u0028\u0029\u0021\u003F\u002E\u0026\u005E\u007E\u002B\u002A\u002F\u003A\u003B\u003C\u003D\u003E]/g,'');
str = str.replace(/[\s\'\:\/\[\]-]+/g,' ');
str = str.replace(/[ ]/g,'-');
str = str.replace(/[\/]/g,'-');