Stop AEM from Converting Double Quotes

Avatar

Avatar
Validate 10
Level 2
MktgCloudUser
Level 2

Likes

14 likes

Total Posts

43 posts

Correct reply

2 solutions
Top badges earned
Validate 10
Validate 1
Ignite 1
Give Back
Boost 5
View profile

Avatar
Validate 10
Level 2
MktgCloudUser
Level 2

Likes

14 likes

Total Posts

43 posts

Correct reply

2 solutions
Top badges earned
Validate 10
Validate 1
Ignite 1
Give Back
Boost 5
View profile
MktgCloudUser
Level 2

10-10-2018

Hello,

I have some HTL markup that requires single-quotes for one of the entries instead of double quotes and no matter what I do AEM converts the entries back to double quotes.  I've tried escaping, using <sly> calls, creating the full string in my logic.js - nothing works.  HTML code below:

<video id="${properties.playerid}" class="video-js"

        controls preload="auto"

        width="${logic.width}"

        height="${logic.height}"

        poster="${properties.posterimage}"

        data-setup='{ "techOrder": ["youtube"] }'

>

Even if I hard code the data-setup entry like above, AEM replaces the data-setup=' with data-setup=".  I even tried creating the correct version of the string in my logic.js but I'm not aware of a print/echo function in HTL to just spit out ${logic.configdata} without the name/value pair.

How can I fix this?

Replies

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

10-10-2018

Check the HTL spec for syntax examples -- htl-spec/SPECIFICATION.md at master · Adobe-Marketing-Cloud/htl-spec · GitHub

There is information here about supported quotes.

Avatar

Avatar
Validate 10
Level 2
MktgCloudUser
Level 2

Likes

14 likes

Total Posts

43 posts

Correct reply

2 solutions
Top badges earned
Validate 10
Validate 1
Ignite 1
Give Back
Boost 5
View profile

Avatar
Validate 10
Level 2
MktgCloudUser
Level 2

Likes

14 likes

Total Posts

43 posts

Correct reply

2 solutions
Top badges earned
Validate 10
Validate 1
Ignite 1
Give Back
Boost 5
View profile
MktgCloudUser
Level 2

10-10-2018

Right, I read that one before I posted.  The slashes don't work in this case, not sure why but the output is a broken name/value pair.

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,314 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,314 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

10-10-2018

Hi,

Just want to check, if browser converts single quotes into double, but you can access your data attribute

Screenshot 2018-10-11 at 11.36.56 AM.png