Skip to content

Commit d2f8c43

Browse files
committed
Avoid document plugin problem on XHTML documents
jQuery will choke if the img tag isn't closed.
1 parent 2fee8b7 commit d2f8c43

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/plugin/document.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ class Annotator.Plugin.Document extends Annotator.Plugin
143143
# hack to get a absolute url from a possibly relative one
144144

145145
_absoluteUrl: (url) ->
146-
img = $("<img src='#{ url }'>")
146+
img = $("<img src='#{ url }'></img>")
147147
url = img.prop('src')
148148
img.prop('src', null)
149149
return url

0 commit comments

Comments
 (0)