Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

AEM 6.4 Richtext authored Content adding "\r\n" for new line character.

vipins5188
Level 3
Level 3

Hi All,

Currently we are converting all classic ui component to touch ui component.And we are serving JSON response for all authored content using custom json service.

We have noticed one issue/observation with respect to content authored using RTE. When we try to get json response for RTE content we are getting "\r\n" for new line character.This was not happening in classic UI RTE. In older version it only adds "\n"  for new line character.My concern is why it is adding that extra "\r" with new RTE. Does new RTE "\n" is being replaced by "\r\n"??

Tested this with fresh adobe instance with no custom project code to check if our custom code is introducing this issue but it is available with OOTB RTE.

Using sling:resourceType = "cq/gui/components/authoring/dialog/richtext".

You can reproduce this scenario by creating one RTE component and access json

Please refer below image for RTE component ,json response and jcr content saved data

RTE Touch Box.JPG

RTE jcr value.JPG

RTE json response.JPG

Let me know if more details needed.

5 Replies
smacdonald2008
Level 10
Level 10

I suppose in Granite RTE - this is part of the functionality. I am not aware of any configuration or way to modify this behaviour. I will check with internal ppl - but most are off til Mon.

vipins5188
Level 3
Level 3

Thanks smacdonald2008​ , please check and keep us posted.

Since we are serving JSON endpoints to our consumer heavily, do you think if this is part of Grantie RTE functionality, would it impact on consumer side like earlier for new line "\n" and now "\r\n".

vipins5188
Level 3
Level 3

smacdonald2008​ Did you get a chance to look into above issue ??

manojinim169649
Level 1
Level 1

Hi,

 

I am also facing the same issue in Touch UI RTE component. Is there any solution for this issue?