Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outlinks not properly encoded #5014

Closed
zeine77 opened this issue Apr 17, 2014 · 11 comments
Closed

Outlinks not properly encoded #5014

zeine77 opened this issue Apr 17, 2014 · 11 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@zeine77
Copy link

zeine77 commented Apr 17, 2014

Outlinks are not properly displayed when containing arabic caracters in Piwik 2.2.0 preventing so to get the actual link.

For exemple: I have an outlink to this page (url contains arabic caracters)

zeine77.wordpress.com/2012/10/29/----/

Piwik diplays it like that :

zeine77.wordpress.com/2012/10/29/----/

Keywords: arabic, url, unicode

@zeine77
Copy link
Author

zeine77 commented Apr 17, 2014

Attachment: Outlink as displayed in my Piwik dashboard
Piwik.png

@zeine77
Copy link
Author

zeine77 commented Apr 27, 2014

I'm using UTF-8 charset on all my pages

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

Icouldn't join a web page in attachment (track error), so here is it's live URL.

www.eyil.info/2013/06/%D8%A5%D9%86%D8%B4%D8%A7%D8%A1-%D9%86%D8%B3%D8%AE%D8%A9-%D9%85%D8%AE%D8%B5%D8%B5%D8%A9-%D9%86%D8%B8%D8%A7%D9%85-%D8%AA%D8%B4%D8%BA%D9%8A%D9%84-%D8%A3%D9%88%D8%A8%D9%86%D8%AA%D9%88-%D8%A8/

There is a link in it, properly encoded it gives this:

zeine77.wordpress.com/2013/05/31/%d8%aa%d8%ab%d8%a8%d9%8a%d8%aa-oracle-virtualbox-%d9%84%d9%84%d8%a3%d8%ac%d9%87%d8%b2%d8%a9-%d8%a7%d9%84%d9%88%d9%87%d9%85%d9%8a%d8%a9-%d8%b9%d9%84%d9%89-%d9%84%d9%8a%d9%88%d9%86%d9%83%d8%b3-%d8%a3/

The second screenshot (Piwik-Outlinks-Unicode.png) is for the same outlink as displayed in my Piwik dashboard

Hope this helps, thanks for having time responding my request.

@zeine77
Copy link
Author

zeine77 commented Apr 27, 2014

Attachment: Outlink as displayed in my Piwik dashboard
Piwik-Outlinks-Unicode.png

@mattab
Copy link
Member

mattab commented Apr 28, 2014

Thanks I was able to reproduce the issue (link displayed wrong on Visitor Log + Referrers > Websites).

With HTML

<html><head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 </head>
 <body>
 <a  target="_blank" href="http://example.org/2013/06/%D8%A5%D9%86%D8%B4%D8%A7%D8%A1-%D9%86%D8%B3%D8%AE%D8%A9-%D9%85%D8%AE%D8%B5%D8%B5%D8%A9-%D9%86%D8%B8%D8%A7%D9%85-%D8%AA%D8%B4%D8%BA%D9%8A%D9%84-%D8%A3%D9%88%D8%A8%D9%86%D8%AA%D9%88-%D8%A8/">it works (not)</a>

 <!-- Piwik -->
<script type="text/javascript">
  var _paq = _paq || [];
  _paq.push(['trackPageView']);
  _paq.push(['enableLinkTracking']);
  (function() {
    var u=(("https:" == document.location.protocol) ? "https" : "http") + "://localhost/piwik-master/";
    _paq.push(['setTrackerUrl', u+'piwik.php']);
    _paq.push(['setSiteId', 1]);
    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.type='text/javascript';
    g.defer=true; g.async=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
  })();
</script>
<noscript><p><img src="http://localhost/piwik-master/piwik.php?idsite=1" style="border:0;" alt="" /></p></noscript>
<!-- End Piwik Code -->


@zeine77 zeine77 added this to the 2.x - The Great Piwik 2.x Backlog milestone Jul 8, 2014
@mattab mattab modified the milestones: Mid term, Short term Oct 11, 2014
@mattab
Copy link
Member

mattab commented Dec 1, 2014

see also #6244

@saleemkce
Copy link
Contributor

@mattab Hi Matthieu, Could you assign this issue to me? I have already found out the bug causing the whole mess?

@mattab
Copy link
Member

mattab commented Apr 27, 2015

Hi @saleemkce you don't need to have issue assigned to you - since it is in Short term we have not yet scheduled to work on this (we are working on issues in next version milestone on github ie. currently 2.14.0)

@saleemkce
Copy link
Contributor

@mattab, thanks.

On Mon, Apr 27, 2015 at 10:57 AM, Matthieu Aubry notifications@github.com
wrote:

Hi @saleemkce https://github.com/saleemkce you don't need to have issue
assigned to you - since it is in Short term we have not yet scheduled to
work on this (we are working on issues in next version milestone on github
ie. currently 2.14.0)


Reply to this email directly or view it on GitHub
#5014 (comment).

@tsteur
Copy link
Member

tsteur commented May 13, 2015

FYI: In #7866 (comment) and #7866 (comment) we noticed to fully fix this issue we most likely have to replace unescape with decodeURI see comments. unescape is deprecated anyway and there's a chance it breaks piwik.js in newer browsers some day (or probably already and we don't notice). I think decodeURI is available in all browsers but haven't checked. A safe way would be to fall back to unescape with decodeURI is not defined.

@mattab mattab modified the milestones: 2.14.0, Short term May 13, 2015
@mattab
Copy link
Member

mattab commented May 13, 2015

Adding to 2.14.0 as this is a "data quality" bug

@walkercz
Copy link

Hello,

I installed piwik on windows server 2012 R2 and IIS 8 and using it for tracking visits on SharePoint 2013 Server. Everything running as expected. DB and piwik shows UTF8. Piwik UI,visits on sites are shown allright with czech characters ěščřžýáíé but in search and download strings these characters are replaced with Ä�Å¡Ä�Å�žýáÃ_é.

Does anybody know how to solve this problem?

piwik 2.13.1

piwik-bug

mattab added a commit that referenced this issue May 20, 2015
…orks with utf-8 characters

 Previously was using unescape which did not work well with utf8 non ascii characters.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

5 participants