Completed
Last Updated: 14 Nov 2024 09:29 by ADMIN
Release 7.0.0
Roshni
Created on: 10 Oct 2024 14:37
Category: Editor
Type: Bug Report
3
The Editor's HTML markup inline CSS styles do not support semicolons (";") within CSS property values

If the editor's HTML markup contains inline CSS styles, and a CSS attribute value includes a semicolon (;), it breaks the applied styles and throws an exception.

For example:

<p style= "" ....background-image: url('data:image/png;base64...;""</p>

The exception is:

 

Uncaught TypeError: Cannot read properties of undefined (reading 'trim')

 

=== ADMIN EDIT ===

The issue can also occur when there is an invalid inline style with two semicolons without a complete style-value pair in-between.

For example:

<p style=""color:red; b ;"">sdf</p>

1 comment
Sara
Posted on: 29 Oct 2024 06:44

Hi,

I had a problem with this too. For me it was extra spaces after the last style pair.

i resolved this by adding the row below in the minified js file :
if (n !== undefined && n[0] != undefined && n[1] !== undefined)

before this code:
e.style[n[0].trim()]=n[1].trim()

It is located in two places in the file and i added the if in both places. So if the style is badly formatted we ignore it.

Like this:

function(t){
var n=t.split(":");
if (n !== undefined && n[0] != undefined && n[1] !== undefined)
e.style[n[0].trim()]=n[1].trim()
}