Merge pull request #1488 from okriuchykhin/ok_SCI_3030

Fix TinyMCE images in protocol import [SCI-3030]
This commit is contained in:
Alex Kriuchykhin 2019-02-11 13:41:01 +01:00 committed by GitHub
commit b7d7e4bf10
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -270,7 +270,7 @@ function importProtocolFromFile(
element.getAttribute('fileref'));
var image_tag = "<img style='max-width:300px; max-height:300px;' src='data:" + element.children[1].innerHTML + ";base64," + assetBytes + "' />"
description = description.replace(match, image_tag); // replace the token with image
}).bind(this);
});
// I know is crazy but is the only way I found to pass valid HTML
return $('<div></div>').html(
description.replace('<!--[CDATA[ ', '')