Expand my Community achievements bar.

SOLVED

Page is freezing after adding two or more semicolons in inline css style in source edit of RTE

Avatar

Level 7

In RTE I am trying to add below line in source edit
<h1 style="color: blue;;">A Blue Heading</h1>

It has two semicolons after blue

when I try to move out of source edit whole page freezes and doesn't respond. Tried multiple time same issue is there. 

 

 

1 Accepted Solution

Avatar

Correct answer by
Level 2

Hi @Ronnie09 , Same thing happens to me. Everything hangs up. I think this is a bug in RTE source edit validation.
If you try this 

<h1 style="color: blue">A Blue Heading</h1>

closing the source edit validates the content and the end result automatically looks like this

<h1 style="color: blue;">A Blue Heading</h1>

I have checked the course code from /libs/clientlibs/granite/richtext/js/rte/CUI.RichText.js, The following JavaScript method runs into a deadlock.

/**
* Get content from RTE and push it into source editor.
* @private
*/
syncValue: function () {
    if (!this.sourceEditMode || this.togglingSourceEdit) {
        var html = this.editorKernel.getProcessedHtml();
        this.$sourceEditor.val(html);
    }
}

 

View solution in original post

3 Replies

Avatar

Community Advisor

Hello @Ronnie09 

Could you provide some more context? Do you see any errors in the developer console?

Are you suspecting the double semicolons could be causing the page to freeze?

What do the server logs say?

Does the same thing happen on the publish env. too?

 

 

thax,

Preetpal

Avatar

Community Advisor

Check if you get something in the error.log when you move out of the source edit.

AEM applies the principle of filtering (Cross-site scripting) all user-supplied content upon output.

Refer: https://docs.mktossl.com/docs/experience-manager-65/developing/introduction/security.html?lang=en

 

 

Avatar

Correct answer by
Level 2

Hi @Ronnie09 , Same thing happens to me. Everything hangs up. I think this is a bug in RTE source edit validation.
If you try this 

<h1 style="color: blue">A Blue Heading</h1>

closing the source edit validates the content and the end result automatically looks like this

<h1 style="color: blue;">A Blue Heading</h1>

I have checked the course code from /libs/clientlibs/granite/richtext/js/rte/CUI.RichText.js, The following JavaScript method runs into a deadlock.

/**
* Get content from RTE and push it into source editor.
* @private
*/
syncValue: function () {
    if (!this.sourceEditMode || this.togglingSourceEdit) {
        var html = this.editorKernel.getProcessedHtml();
        this.$sourceEditor.val(html);
    }
}