Sightly: getting special characters in element attribute | Community
Skip to main content
cnur24357457
Level 2
Jun 13, 2017 4:28 AM UTC
Solved

Sightly: getting special characters in element attribute

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.
Feike_Visser1
Feike_Visser1Accepted solution
Employee
Jun 21, 2017 9:13 AM UTC

This is invalid HTML...

6 replies

cnur24357457
Level 2
Jun 21, 2017 7:00 PM UTC

Thanks Feike.

Translate
Feike_Visser1
Feike_Visser1Accepted solution
Employee
Jun 21, 2017 9:13 AM UTC

This is invalid HTML...

Translate
cnur24357457
Level 2
Jun 18, 2017 11:47 PM UTC

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

Translate
Feike_Visser1
Employee
Jun 14, 2017 9:58 AM UTC

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

Translate
cnur24357457
Level 2
Jun 13, 2017 8:10 PM UTC

How about &(&amp;) then?

Translate
Feike_Visser1
Employee
Jun 13, 2017 10:07 AM UTC

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

Translate