Single quotes converted to double quotes in sightly | Community
Skip to main content
susheel
Level 5
February 8, 2017

Single quotes converted to double quotes in sightly

  • February 8, 2017
  • 3 replies
  • 2698 views

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.

3 replies

Prince_Shivhare
Community Advisor
Community Advisor
February 8, 2017

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

susheel
susheelAuthor
Level 5
February 8, 2017

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"]' />

Ratna_Kumar
Level 10
February 8, 2017

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

susheel
susheelAuthor
Level 5
February 8, 2017

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

Prince_Shivhare
Community Advisor
Community Advisor
February 8, 2017

hey,

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

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

- Prince