From e9c9884a13f3f6c32e777eb779b179e653e58623 Mon Sep 17 00:00:00 2001 From: Thibaut Date: Sun, 19 Oct 2014 12:52:06 -0400 Subject: [PATCH] Fix scrollToTarget when element id has encoded uri components --- assets/javascripts/views/content/content.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/assets/javascripts/views/content/content.coffee b/assets/javascripts/views/content/content.coffee index e0a89678..e6616f13 100644 --- a/assets/javascripts/views/content/content.coffee +++ b/assets/javascripts/views/content/content.coffee @@ -157,7 +157,9 @@ class app.views.Content extends app.View $.stopEvent(event) findTargetByHash: (hash) -> - try $.id decodeURIComponent(hash) catch + el = try $.id decodeURIComponent(hash) catch + el or= try $.id(hash) catch + el isExternalUrl: (url) -> url?[0..5] in ['http:/', 'https:']