Page is freezing after adding two or more semicolons in inline css style in source edit of RTE | Community
Skip to main content
Level 6
July 7, 2023
Solved

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

  • July 7, 2023
  • 3 replies
  • 936 views

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. 

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Hafizur-Rahman

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); } }

 

3 replies

Preetpal_Bindra
Community Advisor
Community Advisor
July 7, 2023

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

rawvarun
Community Advisor
Community Advisor
July 7, 2023

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

 

 

Hafizur-Rahman
Hafizur-RahmanAccepted solution
Level 2
July 11, 2023

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); } }