Fix scrollToTarget when element id has encoded uri components

This commit is contained in:
Thibaut 2014-10-19 12:52:06 -04:00
parent cc509c17f2
commit e9c9884a13

View file

@ -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:']