Questions tagged [html-entities]
HTML entities provide a method of entering characters that cannot be expressed in the document's character encoding or that cannot easily be entered on a keyboard.
1,337
questions
0
votes
0
answers
27
views
Parse error for Handlebars partial: {{> interpreted as {{>
I'm following this guide to use partials in my web project: https://handlebarsjs.com/examples/partials/basic.html
In the .html file, I was using this just fine (using Tailwind CSS):
{{#each pages}}
&...
1
vote
1
answer
76
views
HTMLEncode and HTMLDecode not working when data is bound to asp:GridView
I have a weird observation with respect to HttpUtility.HTMLEncode and HttpUtility.HTMLDecode when encoded data is bound to a grid and later decoded on rowdatabound event. Here is some code for ...
0
votes
0
answers
43
views
HTML entities not rendering correctly on mobile browser
We are using the font Proxima Nova. Somehow on mobile browsers (works fine on desktop), some HTML entities do not render correctly.
Ex nbsp renders as É, ' renders as Õ.
Has it something to do with ...
1
vote
1
answer
75
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 ...
1
vote
1
answer
60
views
Special char jquery
I have a problem with > and jquery datatable shows '>' fine but when I click on the row I get the character > and I'm desperate.
Any solution?
$('#sample tbody').on('click', 'tr', ...
4
votes
1
answer
173
views
Left and right quotation mark render as unexpected character in Safari
I have a simple piece of text like so:
<h1 class="intro-text" id="main-title">‘AN ABRAM’</h1>
This should render the following output (this is correct in ...
1
vote
1
answer
25
views
How do I line break while also disabling code being executed in textarea?
I have PHP set up for a textarea that prints text from a directory to separate divs.
<?php
$content = implode("<br /><hr class='separator'>",array_map(function ($v) {
...
1
vote
1
answer
34
views
Reading html content with without escaping? [duplicate]
I am trying to read the html content using innerHTML. It seems to convert the '<' in the text content to '<' .
I would rather not to. Is there anything in JS that would allow me to render as ...
0
votes
1
answer
29
views
Named entities in Reportlab
I just learned that Reportlab will support named entities like α and ≈ in paragraph text. Exactly which entities will it support?
Here's an example of how it works:
from reportlab....
-1
votes
1
answer
37
views
BeautifulSoup4 doesn't read ≈ as an HTML entity
This seems familiar; why does ≈ not get picked up by html.parser?
>>> from bs4 import BeautifulSoup
>>> for html in ['hey ‘ 3','hey π','hey ≈ 3'...
0
votes
1
answer
50
views
problems displaying html characters
I'm building a sign-in/up form and I have problems displaying HTML characters. When a user signs up, I use this function for the sign-up data and then insert it into the database.
function clearInput( ...
0
votes
0
answers
14
views
My text content auto entities html tag after submit
enter image description here
I have strange issue with my text content on text editor field. When I have not much content, it work correct. But when I input a lot of content on many fields, the ...
0
votes
0
answers
30
views
Prevent POM.xml from transforming HTML Entities to special Characters
i am using the maven-replacer-plugin to replace some Strings.
I have a Document which contains something like this:
Test Text <br/> Test 123
and i want to replace the "<br/&...
1
vote
1
answer
481
views
How to correctly render html entities assigned to variables in React?
In React, the code below correctly renders a double quotation mark (") to the page:
export default Character() {
return (
<p>"</p> // renders as the symbol "
)
}
...
-2
votes
1
answer
143
views
how to put < > and double space or multiple space in my html tag or in my element [duplicate]
how can I put <>'' or more space in html tag <>
this is my code that have problem.
<div>
<p> > or < </p>
</div>
0
votes
1
answer
35
views
NodeJS converts passed html content to entities by default
In my website I want to have a tree of categories. To get this to work, I need to arrange them in a parent-child tree through a recursive loop. What I did was to fetch the category data from the ...
0
votes
0
answers
46
views
How to check if the special character I'm seeing is indeed what I'm seeing or it's just an HTML entity in disguise?
I have a div containing a string which is a Cypher query:
<div id="foo">match (n)-[r]-() where n.gid='Cx' return n,r</div>
Since the ' character will be encoded as ’, ...
1
vote
0
answers
228
views
How to properly add the ampersand to the title tag
I have a title that includes the ampersand (&) but not sure how to add it properly so the web can read it.
if it write it like the
<title> something something & something </title>
...
0
votes
0
answers
16
views
Why browser converts html entity without ; and inside href attribute of tag <a>
I have html code:
<a href="/search.php?h=3&dates%5B%5D=&...¬_first=on">link</a>
There is a text ¬_first in URL which converts to ¬_first in Chrome and ...
0
votes
1
answer
95
views
CheerioJS to parse data on script tag
I've been trying to parse the data that is in the script tag using cheerio however It's been difficult for the following reasons.
Can't parse string that is generated into JSON because of html-...
1
vote
1
answer
126
views
Groovy (or Java): How to escape double quotes only within HTML inner text, not in attributes
I am using a HTML rendering engine based on Groovy within a WCM system.
I now have the use case, that the user enters rich text content within a TinyMCE-based form, which looks like this:
<p>...
0
votes
0
answers
43
views
Why is the German double quote called „ while the single quote is called ‚?
Why is the German (and in some other languages) double quotation mark "„" given the HTML name „, while the single-quote "‚" is given the HTML name ‚?
It would ...
1
vote
1
answer
362
views
Convert HTML entities in Json back to characters
Problem and original data
I have a json data which contain some HTML entities to encode some special characters (mostly from French language, like “é”, “ç”, “à”, etc.) and for html tags.
This is a ...
1
vote
1
answer
71
views
How to Insert dot(.) again in textarea, if we have created a function to replace it?
I have created a function to replace dot(.) into purnviraam, it works fine. but If we need to insert " . " again in textarea, I have created a button neart textarea with function. it ...
1
vote
1
answer
118
views
Compare HTML encoded text to plain text in PHP
I have two same strings but one is having HTML entities and the other is its equivalent character:
$s1 = "‘Dragon’";
$s2 = "'Dragon'";
Is there any way I can ...
-3
votes
1
answer
113
views
How do I search for invisible characters in a database table column?
The database table in question has a unique username column. When the usernames are listed in phpMyAdmin or SqlYog, a duplicate for at least one username appears.
When the username is displayed on a ...
0
votes
0
answers
64
views
How to change । again into "।" that is Hindi Full Stop Character (Purnviram)
This block of code gives me code । instead of "।", so how to change । again into "।". "।" is Hindi Full Stop Character known as Purnviram. This code ...
0
votes
1
answer
39
views
Prevent UrlFetchApp creating special entities
Is there any way to prevent Apps Script URlFetchApp from creating special characters? For example on a webpage there might be an apostrophe but when I look in the fetched page source that apostrophe ...
0
votes
0
answers
77
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 ...
1
vote
1
answer
37
views
I want to make a text converter to unicode converter. The code was going pretty well but I am stuck at changing as '\' is shown invalid
else if (arr2[i] == ']') {
mainarr.push('े')
} else if (arr2[i] == '}') {
mainarr.push('ै')
} else if (arr2[i] == '\') {
mainarr.push('्')
}
I want to make a text converter to Unicode converter....
0
votes
1
answer
178
views
Jsoup is not escaping entities in string like it should
I created a method to strip some elements from HTML using Jsoup, but Jsoup is not escaping the accented characters like it should.
Here is my code, with a main() to test, so it's self-contained and ...
3
votes
3
answers
95
views
Are there some valid HTML entities without the semicolon?
Looking at this official entities.json file, some of the entities are defined without an ending semicolon.
For example:
"Â": { "codepoints": [194], "characters": ...
0
votes
0
answers
12
views
Why html entities are appeared malformed in my Ubuntu Crome Browser while in windows are perfect?
When I am using e.g right arrow: → in (Ubuntu) Chrome browser in html code it appears lowered and tiny, whether in (Windows) Chrome or other browsers is perfectly fine. Anyone has any idea why this is ...
0
votes
1
answer
149
views
innerHTML of PHP DOMDocument and HTML entities
I save innerHTML of an element by
function innerHTML(DOMNode $el){
$html='';
foreach($el->childNodes as $node){
$temp=new DOMDocument();
$temp->appendChild($...
0
votes
0
answers
13
views
jQuery get html character entity from div content [duplicate]
I have div with HTML character ▲ content like:
<div id="div1">▲</div>
I want to get the content of div1 ie, ▲ in jQuery. I did
$('#div1').html();
...
0
votes
1
answer
58
views
Converting Fractions to Decimals [duplicate]
I have strings with HTML fractions. How can I convert them to decimals?
Do I need to replace the fractions with their values? But in the case of 1 ⅔ it is not so easy, because I need to add the 1.
<...
1
vote
1
answer
212
views
Can you use HTML entities in JSON-LD?
I am planning to add JSON-LD on some web pages and some have the letter enye (ñ). I had previously replaced the letter with the HTML entity ñ, but later realized the ñ in the JSON-LDwas also ...
0
votes
1
answer
212
views
How to decode HTML entities in Spark-scala?
I have a spark code to read some data from a database.
One of the columns (of type string) named "title" contains the following data.
+-------------------------------------------------+
|...
0
votes
1
answer
61
views
Getting behaviour like Python 3 html unescape in Python 2
So I've encountered an issue where it seems like Python 2 (2.7.13) simply doesn't have the required HTML entities defined for escaping all of them.
For example when running this script:
# ...
0
votes
0
answers
96
views
How to use &/ampersand in HTML/blade.php
Im currently using ampersand in my blade.php and ideally wanted to use this & on my code but it doesnt work
<li>
@include('timesheet.components.DropDown', [
...
2
votes
1
answer
634
views
How to unescape HTML 5 entities in Java (')
The answers to this question mostly suggest to use apache-common-text StringEscapeUtils. But this (latest version of commons-text is 1.9) only supports HTML 4, and Mastodon appears to use HTML 5 which ...
0
votes
1
answer
29
views
Writing HTML Entities to a File
I'm getting a UnicodeEncodeError when I run the code below. It simply loops until i = 9000, appends an html entity to a list based upon the value of i, then writes the list to a file after looping. ...
0
votes
0
answers
75
views
Laravell @yield is converting quotes to html entities
Upgraded a Laravel 5.3 site to Laravel 8 (php8). Everything works except for a little snippet:
window.appModules = [@yield("app-modules" , "'main'")] ;
This is now rendering with ...
0
votes
0
answers
110
views
Add HTML entity with ElementTree
I'm generating some HTML using ElementTree in a Python script. The relevant part looks like this:
separator = ET.SubElement(toc, 'span')
separator.set('class', 'separator')
separator.text = u"&...
-1
votes
1
answer
323
views
Using sed command replace in the input text file all occurrences of characters '&', '<', '>' with their HTML entities
this is my input text file
< > & * ^ % $ # @ ! ) ( ) < > < > > > <
This is the sed shell script that I am using.
sed 's/&/&/g ; s/</</g ; s/>/&...
1
vote
1
answer
190
views
How do I clean up Beautiful soup's output
I am trying to scrape a book from a website and while parsing it with Beautiful Soup I noticed that there were some errors. For example this sentence:
"You have more… direct control ...
0
votes
0
answers
250
views
How to get the ElementTree.toString method to output a non breaking space (nbsp)?
How can I get the ElementTree.toString method to output from a node's text attribute?
import xml.etree.cElementTree as ET
node = ET.Element("node")
node.text = "hello&...
0
votes
2
answers
235
views
Encode only accented characters in an HTML string
I have the following function that accepts an HTML string, for example "<p>áêö</p>":
public string EncodeString(string input)
{
// ...
return System.Net.WebUtility....
0
votes
2
answers
35
views
PHP - Having more than one htmlentities() in your code
I just came across building a CRUD application in PHP, and the instructor was reminding us about the use of htmlentities() in order to avoid HTML injections, and he then goes to say that htmlentities ...
0
votes
1
answer
104
views
grab URL parameters with special characters
I am grabbing the parameters from the URL using the following:
<?php echo $_GET['compname']; ?>
I just noticed that some of the parameters include special characters, so I tried using the ...