diff --git a/js/redactor-osticket.js b/js/redactor-osticket.js index 337d525a5d1cbc5a85601313cf2e941b242d00d4..09629a041ad1e60d9a4f5988210aa56564aea6c2 100644 --- a/js/redactor-osticket.js +++ b/js/redactor-osticket.js @@ -126,8 +126,9 @@ $(function() { // TODO: Rewrite the entire <img> tag. Otherwise the @width // and @height attributes will begin to accumulate before = img.outerHTML; - $(img).attr('width', img.clientWidth) - .attr('height',img.clientHeight); + if (img.clientWidth && img.clientHeight) + $(img).attr('width', img.clientWidth) + .attr('height',img.clientHeight); html = html.replace(before, img.outerHTML); }); // Drop <inline> elements if found in the text (shady mojo happening