From 8156930208c0a7d9a967528ca7dfbb5c7c8a4772 Mon Sep 17 00:00:00 2001 From: John McLear Date: Mon, 26 Jan 2015 01:44:40 +0000 Subject: [PATCH] clean support for image hook --- src/static/js/contentcollector.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/static/js/contentcollector.js b/src/static/js/contentcollector.js index 1f0620fef..ca193f73e 100644 --- a/src/static/js/contentcollector.js +++ b/src/static/js/contentcollector.js @@ -458,6 +458,20 @@ function makeContentCollector(collectStyles, abrowser, apool, domInterface, clas else { var tname = (dom.nodeTagName(node) || "").toLowerCase(); + + // Images shouldn't be defined as empty. + if (tname == "img"){ + isEmpty = false; + hooks.callAll('collectContentImage', { + cc: cc, + state: state, + tname: tname, + styl: styl, + cls: cls, + node: node + }); + } + if (tname == "br") { this.breakLine = true;