WYSIWYG editor accepts HTML with embedded images but doesn't display them correctly

Daniel Lenski April 17, 2018

If I paste HTML containing images embedded via data: URIs into the WYSIWYG editor in Confluence 5.9.3, then…

  • In the WYSIWYG editor, the embedded images are displayed correctly
  • When viewing the resulting pages, the embedded images are not shown, and replaced with a red box saying "Broken Image"

 

This is really frustrating, because it means that there's no way to paste rich text containing images directly into the Confluence WYSIWYG editor, while ensuring that the images on the resulting page will be viewable by page viewers.

 

Here is an example of HTML that will trigger this misbehavior:

<h1>Here is a small picture of a cute monkey</h1>

<img src="data&colon;image/png;base64,/9j/4gIcSUNDX1BST0ZJTEUAAQEAAAIMbGNtcwIQAABtbnRyUkdCIFhZWiAH3AABABkAAwApADlh
Y3NwQVBQTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA9tYAAQAAAADTLWxjbXMAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAApkZXNjAAAA/AAAAF5jcHJ0AAAB
XAAAAAt3dHB0AAABaAAAABRia3B0AAABfAAAABRyWFlaAAABkAAAABRnWFlaAAABpAAAABRiWFla
AAABuAAAABRyVFJDAAABzAAAAEBnVFJDAAABzAAAAEBiVFJDAAABzAAAAEBkZXNjAAAAAAAAAANj
MgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB0ZXh0AAAAAEZCAABYWVogAAAAAAAA9tYAAQAAAADT
LVhZWiAAAAAAAAADFgAAAzMAAAKkWFlaIAAAAAAAAG+iAAA49QAAA5BYWVogAAAAAAAAYpkAALeF
AAAY2lhZWiAAAAAAAAAkoAAAD4QAALbPY3VydgAAAAAAAAAaAAAAywHJA2MFkghrC/YQPxVRGzQh
8SmQMhg7kkYFUXdd7WtwegWJsZp8rGm/fdPD6TD////bAEMABAMDBAMDBAQDBAUEBAUGCgcGB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ggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events