Questions tagged [html-escape]
50 questions
1
vote
2 answers
Go template HTMLEscape json data and it show """ issue
i try to put json data to web, i use json.Marshal to create json data.
Flowing picture is fmt.Println(string(jsonOut)) result
i use template.HTMLEscape(w, []byte(jsonOut)) to show in web, it will show like following picture.
the " become ".
why…

Peggy
- 372
- 1
- 6
- 27
1
vote
1 answer
Thymeleaf: ClassNotFoundException: org.unbescape.html.HtmlEscape
My simple Spring Boot application with thymeleaf doesn't work. It gives me an "unexpected error (type=Internal Server Error, status=500).org/unbescape/html/HtmlEscape" when request the localhost:8080/hello:
import…

len
- 376
- 2
- 19
1
vote
1 answer
How to embed html inside json in a format that Sendgrid API accepts?
I have been trying to send an HTML email using the Sendgrid API, but I have been unsuccessful in embedding the html inside the json request.
This is an example of the html I am trying to send (emailtpl):

Darian Hickman
- 853
- 10
- 26
1
vote
1 answer
Does the Struts2 tag escape HTML by default?
Unless escapeHtml="false" is explicitly set, the tag escapes HTML by default:
Does also behave this way ?

steven35
- 3,747
- 3
- 34
- 48
1
vote
2 answers
Error - Perl execution failed. Wide character in syswrite
I have a perl script which runs a bunch of commands redirects both stdin and stderr into a text file. After the scripts finish, I display the contents of the file to a webpage that invoked it, using cgi.
At least one of the lines wrote to the file…

James Oravec
- 19,579
- 27
- 94
- 160
1
vote
1 answer
In Meteor, how do I mark up some user-entered text before displaying it?
I have a Meteor 0.8.3 app with the template:
Description: {{desc}}
and javascript:
Template.example.desc = function(){
return Session.get("desc");
}
where the user has set the Session's desc.
I want to…

Racing Tadpole
- 4,270
- 6
- 37
- 56
1
vote
1 answer
CQ5 inplace editing and escaping html
I have a simple component that uses a xtype="textfield". In the JSP I am using the cq:text tag along with the escapeXml="true" attribute in order to escape the html characters. This works as it should. However if I start inline editing the component…

Alisneaky
- 205
- 1
- 3
- 15
1
vote
2 answers
h:outputText is not escaping HTML entities
I am having an issue where '<' is NOT escaped by outputText in JSF.
I am running Tomcat 7.0.40 with JSF 2.0, and have the following declarations:
This line…

urbanmarsupial
- 21
- 1
- 5
1
vote
0 answers
How to prevent & conversion to & when using JavaScript? (browser specifc)
I have a problem concerning string output on HTML page when using Javascript and ASP. Logic of page generation goes like this:
We use asp page to generate HTML code using Response.Write(). If string contains numeric character reference (for…

user2699786
- 11
- 3
1
vote
1 answer
How to mention link in properites file
I have created properties file and configured all the verbiage in the that property file. I need to add the text which will be having the link. For e.g. Text is Please Contact Us. This text i have mention in the property file but I need to add the…

user2625662
- 21
- 1
- 3
1
vote
1 answer
h:outputText not rendering HTML from XML response in spite of escape="false"
I have the following code:
The result is:
Location.
a
The string from #{bean.shortDescription} is being taken from an XML response that is…

Timu
- 59
- 2
- 8
1
vote
2 answers
How to unescape HTML in Struts2
I have saved some basic HTML in a database. This HTML is via ValueStack in Action class redisplayed as in JSP file.
However, the HTML code is not interpreted, but escaped and displayed as is (eg. BOLD is…

Min Naing Oo
- 1,085
- 5
- 24
- 49
0
votes
0 answers
Escaping snippets of html code in a long string
I am trying to escape HTML between ''' triple quotes ''' and ' single quotes '.
Here is my code:
import html
import re
#Replace triple backticks with escaped HTML
response = re.sub(r"'''([\s\S]*?)'''", lambda match: "'''" +…

Cindy
- 1
- 1
0
votes
1 answer
Html escape in byte array - xss issue
I have byte array with html and try to escape. I convert byte array to string and replace special characters. When I make replace, my html doesnt work properly. It looks like a string and no css.
How to make properly ?
String x=…

k.kbr
- 45
- 6
0
votes
1 answer
html_escape seems to be broken after upgrading to Rails 3.1
I have a project that uses the WYSIWYG editor 'wysihat-engine' by Dutch guys from 80beans . It use to work fine with Rails version 3.0.9 , but after upgrading to 3.1.0 the wysihat-engine cannot find 'html_escape' from ERB::Util (ActiveSupport 3.1.0)…

R Milushev
- 4,295
- 3
- 27
- 35