accept non-ascii IRIs

This commit is contained in:
Seb Bacon 2011-04-10 09:20:49 +01:00
parent ee15b29de8
commit 11d3777a66
1 changed files with 2 additions and 1 deletions

View File

@ -48,8 +48,9 @@ class GoogleAnalyticsPlugin(SingletonPlugin):
# add download tracking link
def js_attr(name, event):
attrs = event[1][1]
href = attrs.get('href').encode('utf-8')
link = '%s%s' % (resource_url,
urllib.quote(attrs.get('href')))
urllib.quote(href))
js = "javascript: _gaq.push(['_trackPageview', '%s']);" % link
return js