Questions tagged [html-escape-characters]

HTML escape characters are special codes, used to display Unicode characters including those which can't be typed on a standard keyboard and those having a special meaning to HTML.

Filter by
Sorted by
Tagged with
0 votes
0 answers
19 views

Trying to escapeHtml Characters with Jsondeserializer in spring boot, But when ever it is persisting html escaping is happening more than once

lets consider this scenario. 1.I have created a deserializer class 2.used JsonDeserilizer anotation in POJO class. ----------up to now everything is going good---------- when request come to ...
Rajoli Hemanth Kumar's user avatar
0 votes
0 answers
38 views

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]*...
Cindy's user avatar
  • 1
0 votes
1 answer
278 views

Display html characters in Svelte

I have a Svelte app REPL where I wish to convert strings to html characters. <h1>Test html codes</h1> {#each lines|| [] as line} <div id="comment-line"> {line} ...
Psionman's user avatar
  • 3,219
0 votes
1 answer
121 views

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 ...
k.kbr's user avatar
  • 45
0 votes
2 answers
116 views

Escape html in java using entity numbers instead of names

Java can escape html using e.g. Apache CommonsText StringEscapeUtils but it will use html entity names, not numbers. So > becomes &gt; Is there a library or class or some feasible custom ...
Mko's user avatar
  • 148
1 vote
1 answer
76 views

HTML Special Character Codes translation in text XSLT 2.0

I receive text from source system with HTML special escape characters in middle of text. Now I need to translate it to the actual character in XSLT 2.0 I/p like <Data>Lenevo100 f&amp;uuml;r ...
HKmar's user avatar
  • 45
0 votes
0 answers
92 views

Why does my JS URL string's & get converted to #038; on some server setups?

I have a HTML select field with options and some JS which builds a URL and adds it as the value of the options: <script> $( document ).ready(function() { url = ''; url += '?...
bigdaveygeorge's user avatar
0 votes
0 answers
84 views

How to partially escapeHTML in Ruby (dont escape HTML tags)

I ned to write a string that could escape both these strings. str = "We couldn't help" str = "We couldn&#39;t help." I achieved that using CGI.escapeHTML(CGI.unescapeHTML(str))...
Devamalya Hazra's user avatar
1 vote
1 answer
63 views

How to escape an ampersand in an CSS attribute selector?

I'm trying to build a CSS selector that specifically distinguishes between elements that have a background image given as data URI: <div style="background-image: url(&quot;data:image/svg+...
Madamadam's user avatar
  • 882
0 votes
0 answers
125 views

how to use font-awesome icons with their unicode in JavaScript (disable the escabe characters)

I am trying to use font-awesome icon with their unicodes but backslach is recognized as a escabe character. switch (description) { case "sunny": icon = 'f112'; ...
afk59's user avatar
  • 1
-3 votes
2 answers
55 views

How to caculate the number of all elements including escape sequences in a string? [duplicate]

I have a string, and I have to count all elements in this string. str = '\r\n\r\n\r\n \r\n \xa0\xa0\r\nIntroduction\r\n\r\n\r\nHello\r\n\r\nWorld\r\nProblems...\r\nHow to calculate numbers...\r\...
J.H's user avatar
  • 15
0 votes
1 answer
211 views

JSON Parse: Expecting "EOF" got undefined error

Im trying to PARSE this JSON and getting this error Expecting "EOF" got undefined error, not sure not sure what I am missing in line 14. example: { "plotOptions": { &...
Ben Rig's user avatar
  • 81
0 votes
1 answer
415 views

How to replace the escape unicode characters like \u001A in a string to empty spaces

I have a string like A, How to convert it to B in SQL A. "My Name is \u001AVinaykumar. I am \u001AFrom AndhraPradesh. I have completed my B.tech\u001A in Osmania University" B. "My Name ...
vinay reddy's user avatar
-1 votes
1 answer
461 views

Java StringEscapeUtils.escapeHtml4 as regular text

My target is to display special letters of message as regular text after using StringEscapeUtils.escapeHtml4. Text example: <html> <body> <p>éô</p> </body> </html> ...
Constantine Ch's user avatar
0 votes
0 answers
75 views

html entities not converting special symbols

I'm using express-validator to sanitize and escape the inputs from body, the input is 2/1 I sanitize as follows: body("abbreviation") .notEmpty() .isLength({ min: 2, max: 11 }) ...
Amine Deflaoui's user avatar
0 votes
2 answers
508 views

Escape text in a method instead of in brackets in Vue

I've got a case where I have a text that begins with characters like &nbsp; that I do not want to escape, but then the rest of the string I do want to escape. In Vue, given text = "&nbsp;&...
Chris's user avatar
  • 4,307
1 vote
1 answer
147 views

How to replace \\n with a space from dataframe column? (escape sequence)

I am trying to replace all "\n" with a space in char strings in a column of data in R but not having much luck. (I also will need to get rid of all single backslashes with nothing but haven'...
ThreatworkAnalyst's user avatar
0 votes
1 answer
264 views

How to detect escape characters looping through string in javascript?

I have a scenario where I need to format a string into an array to display it in a different way to the user. So, when I get an escape character (for a new line) \n I need to add that as a separate ...
Thidasa Pankaja's user avatar
0 votes
1 answer
192 views

PHP: How to convert escaped characters to plain text without str_replace

Convert escaped characters/ whitespaces to plain text I received data from another database and want to data as plain text. For now it is using \n, \v,\e, \t, etc as escaped characters. But I want to ...
Arun Sharma's user avatar
0 votes
2 answers
234 views

Pass JSON via command line whilst command uses both sets of quotes

I am trying to send this query to my command line: docker exec cardano-node sh -c 'echo { "type": "PaymentExtendedSigningKeyShelley_ed25519_bip32", "description": ...
Barney Chambers's user avatar
1 vote
1 answer
1k views

Angular 7 - Encoding and Decoding HTML Entities In [(ngModel)]

I am having an issue with encoding and decoding HTML Entities on a textarea using ngModel. The Back-End needs and is sending the ><"&' as HTML Entities. This seems like it would be ...
RooksStrife's user avatar
  • 1,657
0 votes
1 answer
300 views

Sanitizing HTML at onsubmit in a form

I read this and I did the below. $confirmation = htmlspecialchars( 'return confirm("' . esc_html__( 'Do you really want to delete?', 'tor-child' ) . '");' ); $output .= '<form method=&...
mewiben39's user avatar
  • 155
0 votes
2 answers
135 views

In string which have escape characters, How to get element by useing Xpath?

I have a html like this. <div id="video1" value="&lt;iframe src=&quot;https://www.move.com/99&quot;&gt;&lt;/iframe&gt;" class="movie"></...
saya-ma's user avatar
  • 33
1 vote
1 answer
355 views

Escape custom tags except html tags

I want to escape custom tags except for HTML tags such as strong, bold, italic. Input: "Hello World! <notification>Name</notification><nat>Nat tag</nat> <strong>...
Rishabh Shah's user avatar
0 votes
2 answers
1k views

HTML Unescape is not unescaping special characters

My program does not unescape the HTML special characters for quotes and I can't figure out why. It still displays the special characters in the Terminal. For example: 'In the comic book &quot;...
Sparky's user avatar
  • 843
1 vote
1 answer
804 views

How to use escape characters in an alt attribute inside an img element in HTML?

Is this the right way to use escape characters in alt attributes for alt text of an img element? I have the below code: <h3>Option 1</h3> <img src="image.jpg" alt='Version of "...
myverdict's user avatar
  • 662
2 votes
2 answers
625 views

Decode chars like &apos into plaintext

So, this is driving me nuts. How can I convert encoded characters like %apos to plaintext? Using Python 3.9. What I Tried: string = 'The guy blasts the other guy on &apos;Russia&apos;s ...
SeaDude's user avatar
  • 3,834
0 votes
1 answer
856 views

How to secure from XSS for services consumed from Angular and non-Angular clients

This question is for an app using an Angular UI (v8.2.14) calling Spring/Java services. I'm trying to figure out how to be secure from XSS vulnerabilities in the most efficient way, but there seem to ...
John C's user avatar
  • 11
0 votes
2 answers
302 views

Django Admin format_html_join cannot seperate with new line <br>

format_html_join( '<br>', '<br><a href="{}">{}</a>', ( (reverse("admin:research_webproductpage_change", args=[wpp.id]), wpp.title[:30]) ...
Ozzy Black's user avatar
0 votes
0 answers
146 views

How to stop Hindi language Character or Symbol '।' Converting into HTML Entity Code on blogger

I am using the below script to convert "." into "।" which is the Hindi stop symbol. I am using this code in a blogger post, The script code converts this dot (.) symbol into HTML ...
Mohammad Suhail's user avatar
-2 votes
1 answer
788 views

How to insert text with apostrophe and other special characters in PHP "echo"? [duplicate]

I can only paste the text as it is (I can add some function around the text however before echoing it) between the echo ''; apostrophes - how can I insert the text in a way that it does not break the ...
Allar's user avatar
  • 85
0 votes
0 answers
30 views

How to escape html characters when end-to-end encryption is used? [duplicate]

I created a web chat using socket.io, it is end-to-end encrypted chat. I am encrypting data using AES-GCM. The data is encrypted on the client side and decrypted on the other client side. And so I ...
Sergei Hronov's user avatar
2 votes
1 answer
516 views

Google Apps Script getPlainBody() from GmailMessage class regex not working

this is my first question on stackoverflow so plz let me know how I can improve readability for others. Am trying to use regex on the string I obtained from getPlainBody() in GmailMessage Class but ...
riceveggi's user avatar
0 votes
1 answer
237 views

@spring.url macro is not getting HTML escaped

I am using spring-boot + freemarker (standard initialiser project ). I have a line in my .ftlh file <a href="<@spring.url '/${customer.email}' />" class="zenith-link&...
zealvault's user avatar
  • 160
0 votes
1 answer
48 views

Unable to display actual material-ui icon within my nav menu

Using Material-UI icons like <AddOutlinedIcon /> as shown below, how can I actually make the icon appear in my nav menu as atm it displays the tags/word <AddOutlinedIcon /> before my menu ...
ArthurJ's user avatar
  • 787
0 votes
1 answer
158 views

German Umlaute in PDF

Situation I am writing a Ruby On Rails application in German and it is able to download PDF files. User entered strings should be shown in the PDF. Like e.g. the cities: "Köln" & "...
Julian's user avatar
  • 27
0 votes
2 answers
553 views

Break up HTML attribute values into multiple lines

Is there a way to format HTML attribute values so they span across multiple lines? Essentially I'm asking is there a way to escape a return inside of a regular typed HTML attribute value. For example ...
Lynel Hudson's user avatar
  • 2,345
1 vote
1 answer
137 views

How to prevent Jsoup from unescaping html?

I am parsing an html string with Jsoup in order to extract just the text, and want to get the exact text, but when I parse strings that include escaped chars Jsoup unescapes them. For example - if I ...
Adi Gutner's user avatar
0 votes
0 answers
214 views

MongoDB automatically replace &lt with <

i want to replace all < in a string with &lt and insert it into MongoDB. But when i insert it, MongoDB automatically replace &lt with <. How can i do to prevent it? This is the code for ...
BlackdestinyXX's user avatar
-1 votes
1 answer
240 views

Single backslash for Ruby gsub replacement value?

Does anyone know how to provide a single backslash as the replacement value in Ruby's gsub method? I thought using double backslashes for the replacement value would result in a single backslash but ...
ddb's user avatar
  • 38
1 vote
1 answer
2k views

Getting rid of escape character in Python so that data can be converted to JSON data

I am getting some data out of the cmd terminal through git log and transporting that data to a JSON file. I parsed out the required data out of that JSON file and intended to put that data into a new ...
Ashish's user avatar
  • 67
1 vote
2 answers
3k views

Is it possible to render svelte component's (end result) HTML code as a string (escape/show raw HTML code)?

I have a simple PrimaryButton.svelte component that contains "HTML" only (no script or style tags) and looks like this: <button class="btn-primary btn accent--br">Primary ...
Dmitry Boychev's user avatar
0 votes
0 answers
521 views

Escape backslash from the json created through requests.get()

I am gathering data through requests.get() from a rest-api url and modifying that data and pushing the modified data back again to the link through requests.put(). Problem is that the modified html ...
Ashish's user avatar
  • 67
0 votes
0 answers
137 views

Rails html_escape all values

I would like to escape all the attributes of a model when fetching the data from DB so that it would avoid XSS. Also, if there are any new columns added in the future it should be escaped by default ...
Pranav RK's user avatar
1 vote
0 answers
418 views

Unmarshaller with custom unescaping some symbols utf-8 and utf-16

I have XML file where some symbols were incorrectly encoded because of mixing UTF-16 and UTF-8. For example, 📞 symbol is encoded as �� (&#55357;&#56542;) instead of 📞 (&#128222;). I want ...
Daria Pydorenko's user avatar
-1 votes
3 answers
1k views

Converting input hex 0A to \n escaped character

I am using webpage to get data in hex to write serial modbus using python Issue is that 0A in the string gets converted to \n. How to stop this from happening? rList = r'0106000600000AE9CC' arr=str(...
embeddedeng's user avatar
1 vote
0 answers
621 views

Issue with HTML character escaping in JAVA spring boot deployed on weblogic server. It works in TEST environment but not in PRODUCTION

In my spring boot application I have below code which has AnnotationConfigWebApplicationContext and i included FrameworkWebconfig class (from jar file) in that AnnotationConfigWebApplicationContext ...
Aniruddha P's user avatar
0 votes
3 answers
499 views

How to write exactly <h2> in html? [duplicate]

I would like to know how to write EXACTLY <h2> in HTML? Because every time I write <h2> in HTML it acts as an element. But I want <h2> as it is on my website.
Kritika's user avatar
0 votes
1 answer
764 views

How to not escape characters in Django Rest Framework

I have a blog model. I have text field where I want to write in HTML, for example including an a tag. The permission class used on unsafe methods is isAdminUser. I don't necessarily have to escape the ...
Zayyan Masud's user avatar
1 vote
1 answer
853 views

Add or update an attribute in a tag using Beautiful Soup python

given the code below: html_code = '<table id="definition-table"><tbody><tr><td>' \ '<p><b><i><span class="lang">*...
user3122496's user avatar

1
2 3 4 5
8