Samples with French character: URL: /Les-droits-r%E9els decode: /Les droits réels
or with German Umlaut
/Hasenb%F6hler-Franz decode: Hasenböhler-Franz
Detailed Error: Uncaught URIError: URI malformedD @ piwik.js:30(anonymous function) @ piwik.js:51(anonymous function) @ piwik.js:52
I used latest Piwik, 2.14.x
Hi @stastka Thanks for the report.
I create a small testpage to reproduce. The site contains links with french and german characters with ISO 8859-1 encoding. :
Line 2140 of the current piwik.js: locationHrefAlias = decodeWrapper(locationArray)
"decodeWrapper" is "window.decodeURIComponent" and "decodeURIComponent" expects UTF-8.
Since "locationArray" holds "window.location.href" and since that contains the ISO-8859-... - characters, current piwik (IMHO) is not fully compatible with websites that encode Links in ISO-8859-...
Is the use of "unescape" instead of / before using "decodeURIComponent" a solution to the problem?
Seems to resolve the issue possible. I would test a patch on my system
@tsteur @mattab I testet the patch e8bde681ec380b53ed15fa14a994176dffa5d58f and i have no error. The visitor log on Piwik show the visiting Test-Page. The Patch resolve the issue.
Thx for the feedback!