Commit a205790c authored by Randall Leeds's avatar Randall Leeds

Merge pull request #261 from gergely-ujvari/242_URLs_with_escaped_chars_dont_match

always search for and store decoded URLs

fix #242
parents 88947126 5be63e0e
......@@ -116,11 +116,11 @@ class Annotator.Host extends Annotator
$(this).removeClass('annotator-hl-active')
getHref: =>
uri = document.location.href
uri = decodeURIComponent document.location.href
if document.location.hash
uri = uri.slice 0, (-1 * location.hash.length)
$('meta[property^="og:url"]').each -> uri = this.content
$('link[rel^="canonical"]').each -> uri = this.href
uri = uri.slice 0, (-1 * location.hash.length)
$('meta[property^="og:url"]').each -> uri = decodeURIComponent this.content
$('link[rel^="canonical"]').each -> uri = decodeURIComponent this.href
return uri
getMaxBottom: =>
......
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