Single quotes converted to double quotes in sightly | Community
Skip to main content
susheel
Level 5
Feb 8, 2017 4:29 AM UTC

Single quotes converted to double quotes in sightly

Hi all,

In sightly if I try to use single quotes its getting converted to double quotes. Same thing renders fine in JSP.
<meta name='tags' content='tag1,tag2' />
converted to
<meta name="tags" content="tag1,tag2" />

I need something like 

 <meta name='tags' content='tag1, tag2' data-content='["tag1", "tag2"]' />

Any Sightly Specific solution ? I know we can include a JSP in sightly but any solution in sightly itself.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

8 replies

Ratna_Kumar
Level 10
Feb 8, 2017 5:14 AM UTC

Hi,

As prince stated, you have to use double quotes(" ")   with meta tag.

See this GITHUB code as same as the mentioned URL by prince. - https://github.com/Netcentric/aem-htl-style-guide

~Ratna

Translate
susheel
susheelAuthor
Level 5
Feb 8, 2017 5:31 AM UTC

Ratna Kumar wrote...

Hi,

As prince stated, you have to use double quotes(" ")   with meta tag.

See this GITHUB code as same as the mentioned URL by prince. - https://github.com/Netcentric/aem-htl-style-guide

~Ratna

 

I need something like 

 <meta name='tags' content='tag1, tag2' data-content='["tag1", "tag2"]' />

Double quotes neccessary for tag1 and tag2 in data-content attribute

Translate
Prince_Shivhare
New Participant
Feb 8, 2017 5:56 AM UTC

hey,

You can try this. if you haven't tried yet.

<meta name="tags" content="tag1, tag2" data-content="['tag1', 'tag2']" />
 

- Prince

Translate
susheel
susheelAuthor
Level 5
Feb 8, 2017 5:06 AM UTC

But I need single quotes as per some requirement for analytics.

I need something like 

 <meta name='tags' content='tag1, tag2' data-content='["tag1", "tag2"]' />

Translate
Prince_Shivhare
New Participant
Feb 8, 2017 4:59 AM UTC

Hi,

Here you can find sightly specific style guide.you should use " " with meta tag.

https://www.netcentric.biz/blog/aem-sightly-style-guide.html

<meta name="author" content="Erik Grijzen" />

 

- Prince

Translate