Commit 94e9374b authored by Gregory Roussac's avatar Gregory Roussac

Merge pull request #2386 from Konafets/1.6

[*] CORE : Improve rewrite of german umlauts in category url
parents 558a0ef3 0fadc7bf
......@@ -36,7 +36,7 @@ function str2url(str, encoding, ucfirst)
else
{
/* Lowercase */
str = str.replace(/[\u00E0\u00E1\u00E2\u00E3\u00E4\u00E5\u0101\u0103\u0105\u0430]/g, 'a');
str = str.replace(/[\u00E0\u00E1\u00E2\u00E3\u00E5\u0101\u0103\u0105\u0430]/g, 'a');
str = str.replace(/[\u0431]/g, 'b');
str = str.replace(/[\u00E7\u0107\u0109\u010D\u0446]/g, 'c');
str = str.replace(/[\u010F\u0111\u0434]/g, 'd');
......@@ -50,21 +50,22 @@ function str2url(str, encoding, ucfirst)
str = str.replace(/[\u013A\u013C\u013E\u0140\u0142\u043B]/g, 'l');
str = str.replace(/[\u043C]/g, 'm');
str = str.replace(/[\u00F1\u0144\u0146\u0148\u0149\u014B\u043D]/g, 'n');
str = str.replace(/[\u00F2\u00F3\u00F4\u00F5\u00F6\u00F8\u014D\u014F\u0151\u043E]/g, 'o');
str = str.replace(/[\u00F2\u00F3\u00F4\u00F5\u00F8\u014D\u014F\u0151\u043E]/g, 'o');
str = str.replace(/[\u043F]/g, 'p');
str = str.replace(/[\u0155\u0157\u0159\u0440]/g, 'r');
str = str.replace(/[\u015B\u015D\u015F\u0161\u0441]/g, 's');
str = str.replace(/[\u00DF]/g, 'ss');
str = str.replace(/[\u0163\u0165\u0167\u0442]/g, 't');
str = str.replace(/[\u00F9\u00FA\u00FB\u00FC\u0169\u016B\u016D\u016F\u0171\u0173\u0443]/g, 'u');
str = str.replace(/[\u00F9\u00FA\u00FB\u0169\u016B\u016D\u016F\u0171\u0173\u0443]/g, 'u');
str = str.replace(/[\u0432]/g, 'v');
str = str.replace(/[\u0175]/g, 'w');
str = str.replace(/[\u00FF\u0177\u00FD\u044B]/g, 'y');
str = str.replace(/[\u017A\u017C\u017E\u0437]/g, 'z');
str = str.replace(/[\u00E6]/g, 'ae');
str = str.replace(/[\u00E4\u00E6]/g, 'ae');
str = str.replace(/[\u0447]/g, 'ch');
str = str.replace(/[\u0445]/g, 'kh');
str = str.replace(/[\u0153]/g, 'oe');
str = str.replace(/[\u0153\u00F6]/g, 'oe');
str = str.replace(/[\u00FC]/g, 'ue');
str = str.replace(/[\u0448]/g, 'sh');
str = str.replace(/[\u0449]/g, 'ssh');
str = str.replace(/[\u044F]/g, 'ya');
......@@ -94,15 +95,16 @@ function str2url(str, encoding, ucfirst)
str = str.replace(/[\u0154\u0156\u0158\u0420]/g, 'R');
str = str.replace(/[\u015A\u015C\u015E\u0160\u0421]/g, 'S');
str = str.replace(/[\u0162\u0164\u0166\u0422]/g, 'T');
str = str.replace(/[\u00D9\u00DA\u00DB\u00DC\u0168\u016A\u016C\u016E\u0170\u0172\u0423]/g, 'U');
str = str.replace(/[\u00D9\u00DA\u00DB\u0168\u016A\u016C\u016E\u0170\u0172\u0423]/g, 'U');
str = str.replace(/[\u0412]/g, 'V');
str = str.replace(/[\u0174]/g, 'W');
str = str.replace(/[\u0176\u042B]/g, 'Y');
str = str.replace(/[\u0179\u017B\u017D\u0417]/g, 'Z');
str = str.replace(/[\u00C6]/g, 'AE');
str = str.replace(/[\u00C4\u00C6]/g, 'AE');
str = str.replace(/[\u0427]/g, 'CH');
str = str.replace(/[\u0425]/g, 'KH');
str = str.replace(/[\u0152]/g, 'OE');
str = str.replace(/[\u0152\u00D6]/g, 'OE');
str = str.replace(/[\u00DC]/g, 'UE');
str = str.replace(/[\u0428]/g, 'SH');
str = str.replace(/[\u0429]/g, 'SHH');
str = str.replace(/[\u042F]/g, 'YA');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment