Sightly: getting special characters in element attribute | Community
Skip to main content
cnur24357457
June 13, 2017
Solved

Sightly: getting special characters in element attribute

  • June 13, 2017
  • 6 replies
  • 3565 views

Java output:

title = title - !  # $ % &  !#$%&()*+,-./:;<=?@[]^_{|}~

<title> ${properties.title @ context = 'unsafe'} </title>

Output:  <title>title - !  # $ % &  !#$%&()*+,-./:;<=?@[]^_{|}~</title>

Where as <meta name="title" content="${properties.title @ context = 'unsafe'}">

Output: <meta name="title" content content="title - ! # $ % &amp; !#$%&amp;()*+,-./:;&lt;=?@[]^_{|}~">

I tried context = text as well

<meta name="title" content="${properties.title @ context = 'text'}">

Output: <meta name="title" content content="title - ! # $ % &amp; !#$%&amp;()*+,-./:;&lt;=?@[]^_{|}~">

For example how can I get "<"  inside the tags instead of &lt;

title124 special characters ! # $ % & !#$%&()*+,-./:;<=?@[]^_{|}~

title124 special characters ! # $ % & !#$%&()*+,-./:;<=?@[]^_{|}~

title124 special characters ! # $ % & !#$%&()*+,-./:;<=?@[]^_{|}~

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

This is invalid HTML...

6 replies

Feike_Visser1
Adobe Employee
Adobe Employee
June 13, 2017

Will this not result in invalid HTML, when you have < in an attribute?

cnur24357457
June 13, 2017

How about &(&amp;) then?

Feike_Visser1
Adobe Employee
Adobe Employee
June 14, 2017

What output do you want? Can you specify the HTML-attribute value you want?

cnur24357457
June 18, 2017

Expected HTML Attribute Value:  <meta name="title" content="title - !  # $ % &  !#$%&()*+,-./:;<=?@[]^_{|}~">

Feike_Visser1
Adobe Employee
Feike_Visser1Adobe EmployeeAccepted solution
Adobe Employee
June 21, 2017

This is invalid HTML...

cnur24357457
June 21, 2017

Thanks Feike.