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.

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.

HTML Entities Format

Entities take the form of &entityname; like in   (which means a non-breaking space) or & (which means &). Entities are also case sensitive, so there is a difference between á (which means á) and Á (which means Á).

Numeric Character References

Besides HTML entities, numeric character references can also be used to express characters. While entities are limited, using numeric character references you can express any character.

Numeric Character References Format

The format is &#number;. number can be either decimal or hexadecimal (prefixed with x).

For example:

✓

...can be reproduced using: ✓ (decimal), ✓ (hexadecimal), ✓ or ✓.

Links

1350 questions
45
votes
6 answers

Converting HTML entities to Unicode Characters in C#

I found similar questions and answers for Python and Javascript, but not for C# or any other WinRT compatible language. The reason I think I need it, is because I'm displaying text I get from websites in a Windows 8 store app. E.g. é should…
Remy
  • 12,555
  • 14
  • 64
  • 104
43
votes
8 answers

Convert HTML Character Back to Text Using Java Standard Library

I would like to convert some HTML characters back to text using Java Standard Library. I was wondering whether any library would achieve my purpose? /** * @param args the command line arguments */ public static void main(String[] args) { //…
Cheok Yan Cheng
  • 47,586
  • 132
  • 466
  • 875
39
votes
5 answers

Native JavaScript or ES6 way to encode and decode HTML entities?

Is there a native way to encode or decode HTML entities using JavaScript or ES6? For example, < would be encoded as <. There are libraries like html-entities for Node.js but it feels like there should be something built into JavaScript that…
Marty Chang
  • 6,269
  • 5
  • 16
  • 25
37
votes
3 answers

C#, function to replace all html special characters with normal text characters

I have characters incoming from an xml template for example: & > Does a generic function exist in the framework to replace these with their normal equivalents?
JL.
  • 78,954
  • 126
  • 311
  • 459
37
votes
3 answers

HTML Entities: When to Use Decimal vs. Hex

Is there a good rule of thumb for when to use decimal vs. hexadecimal notation for HTML entities? For example, a non-breaking hyphen is written in decimal as ‑ and in hex as ‑. This answer says that hexadecimal is for Unicode; does that…
cantera
  • 24,479
  • 25
  • 95
  • 138
35
votes
5 answers

Euro sign or other entity in Javascript alert/messagebox

Does anybody know how i can show a euro or other html entity in javascript alert windows?
Sander Versluys
  • 72,737
  • 23
  • 84
  • 91
35
votes
10 answers

printing "" using html

How do I print the "html" tag, including '<' and '>'? How can I do this for any tag, without using text areas and Javascript?
Jagan
  • 4,649
  • 19
  • 60
  • 70
33
votes
3 answers

How to display   in XML output

I am generating the XML output using XSLT. I need to display   in the XML output. I have tried few options to display   but it displays &nbsp;. Can anyone help me on this issue? Thanks.
dirin
  • 351
  • 1
  • 3
  • 3
33
votes
17 answers

Russian ruble symbol HTML code?

Since Russian central bank already approved the new symbol for Russian ruble, is there any HTML code for it? Or I need to use png images?
user3116402
  • 353
  • 1
  • 3
  • 5
32
votes
5 answers

is there a mysql function to decode html entities?

i was wondering if there is a MYSQL function to decode text with html entities. I have seen some approaches using REPLACE but it looks kinda hard to manage all the entities.
Raul Leaño Martinet
  • 2,035
  • 6
  • 28
  • 44
29
votes
7 answers

Jsoup.clean without adding html entities

I'm cleaning some text from unwanted HTML tags (such as