[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
HTML in TEXTPANE or in SIMPLEHTMLEDITOR not containing images (and other information)  XML
Forum Index -> Development
Author Message
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5510
Offline

(from mail convsersation)

When using Quill-Editor and copy-pasting images then the image is embedded into the HTML text as "data:image"-URL.

When now passing back the same HTML into the Quill-Editor later on - or when passing it into a TEXTPANE with CONTENTYPE "text/html" then the image is not shown anymore.

Why does the image get lost?

Björn Müller, CaptainCasa GmbH
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5510
Offline

Both TEXTPAND and SIMPLEHTMLEDITOR sanitize any HTML that is shown inside. The sanitizing is done by a very restrictive algorithm (taken from Google) checking and cleaning the text according to a positive list of elements.

This sanitizing removes potencially dangerous parts of the HTML text prior to loading them into the TEXTPANE or into the editor.

You can switch off the sanitizing by setting the attribute AVOIDSANITIZING in TEXTPANE od in SIMPLEHTMLEDITOR to "true". - Of course in this case you have to make sure that the content that is loaded is "clean", of course! So you are responsible for sanitzing the content on server-side prior to passing it into the component.

Björn Müller, CaptainCasa GmbH
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team