Skip to content
Snippets Groups Projects
Commit 058aa842 authored by Jared Hancock's avatar Jared Hancock
Browse files

Ensure images, when initially dropped, have a width

parent 466aea5a
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment