Expand my Community achievements bar.

SOLVED

Expression language in jsp, not putting the HTML markup correctly

Avatar

Level 2

Hi Experts,

Issue : double equals(==) gets changed to single equal(=)

Issue explanation : If a property(say named "abc") with value "<img src="https://imagescde==" alt="scam" width="699" height="466" />" is saved in a node(can be jcr:content node of page  or any component node below it).

Code to read the property value in jsp :

${pageProperties.abc}

Instead of o/p as : <img src="https://imagescde==" alt="scam" width="699" height="466" />

It gives below o/p : 

<img src="https://imagescde=" alt="scam" width="699" height="466" />

One equals sign gets removed from src value resulting in image not getting loaded.

[Note : We don't have access to change the src value as we are getting such value

from third party server as json feed and creating pages from feed using scheduler]

Any suggestion will be highly appreciated.

1 Accepted Solution

Avatar

Correct answer by
Level 2

Hi Anton,

Thanks  for your suggestion( change " to ' ), it's working fine when value is <img src='https://imagescde==' alt='scam' width='699' height='466' /> .

May be we need to request third party to change double quotes to single quotes or need to figure out another workaround to make it work.

View solution in original post

4 Replies

Avatar

Level 10

Are you saying the code in your script is being modified from  '==' to '='  

Avatar

Level 3

Just as assumption: try to change " to ' in your property value.

Avatar

Correct answer by
Level 2

Hi Anton,

Thanks  for your suggestion( change " to ' ), it's working fine when value is <img src='https://imagescde==' alt='scam' width='699' height='466' /> .

May be we need to request third party to change double quotes to single quotes or need to figure out another workaround to make it work.