DelphiFAQ Home Search:

Escape codes in HTML

 

comments8 comments. Current rating: 2 stars (1 votes). Leave comments and/ or rate it.

Question:

I need to produce HTML from my javascript and want to write a ' (single quote). I know that " is escaped as ampersand-quot;
How can I escape the single quote?

Answer:

The single quote is escaped using its ASCII code, which is 39 decimal.
You can escape it in HTML as ampersand-pound-39;

Use the table below for all ASCII codes.


 Char  Dec        Hex     Char  Dec        Hex     Char  Dec        Hex     Char  Dec        Hex   
NULL � %00 @ @ %40 &#128 %80 À à %C0
SOH  %01 A A %41   %81 Á Á %C1
STX  %02 B B %42 ‚ %82 Â Â %C2
ETX  %03 C C %43 ƒ ƒ %83 Ã Ã %C3
EOT  %04 D D %44 „ %84 Ä Ä %C4
ENQ  %05 E E %45 … %85 Å Å %C5
ACK  %06 F F %46 † %86 Æ Æ %C6
BEL  %07 G G %47 ‡ %87 Ç Ç %C7
BS  %08 H H %48 ˆ ˆ %88 È È %C8
TAB 	 %09 I I %49 ‰ %89 É É %C9
LF 
 %0A J J %4A Š Š %8A Ê Ê %CA
VT  %0B K K %4B ‹ %8B Ë Ë %CB
FF  %0C L L %4C Œ Œ %8C Ì Ì %CC
CR 
 %0D M M %4D   %8D Í Í %CD
SO  %0E N N %4E Ž Ž %8E Î Î %CE
SI  %0F O O %4F   %8F ± Ï %CF
DLE  %10 P P %50   %90 Ð Ð %D0
DC1  %11 Q Q %51 ‘ %91 Ñ Ñ %D1
DC2  %12 R R %52 ’ %92 Ò Ò %D2
DC3  %13 S S %53 “ %93 Ó Ó %D3
DC4  %14 T T %54 ” %94 Ô Ô %D4
NAK  %15 U U %55 • %95 Õ Õ %D5
SYN  %16 V V %56 – %96 Ö Ö %D6
ETB  %17 W W %57 — %97 × × %D7
CAN  %18 X X %58 ˜ ˜ %98 Ø Ø %D8
EM  %19 Y Y %59 ™ %99 Ù Ù %D9
SUB  %1A Z Z %5A š š %9A Ú Ú %DA
ESC  %1B [ [ %5B › %9B Û Û %DB
FS  %1C \ \ %5C œ œ %9C Ü Ü %DC
GS  %1D ] ] %5D   %9D Ý Ý %DD
RS  %1E ^ ^ %5E ž ž %9E Þ Þ %DE
US  %1F _ _ %5F Ÿ Ÿ %9F ß ß %DF
    %20 ` ` %60   %A0 à à %E0
! ! %21 a a %61 ¡ ¡ %A1 á á %E1
" " %22 b b %62 ¢ ¢ %A2 â â %E2
# # %23 c c %63 £ £ %A3 ã ã %E3
$ $ %24 d d %64 ¤ ¤ %A4 ä ä %E4
% % %25 e e %65 ¥ ¥ %A5 å å %E5
& & %26 f f %66 ¦ ¦ %A6 æ æ %E6
' ' %27 g g %67 § § %A7 ç ç %E7
( ( %28 h h %68 ¨ ¨ %A8 è è %E8
) ) %29 i i %69 © © %A9 é é %E9
* * %2A j j %6A ª ª %AA ê ê %EA
+ + %2B k k %6B « « %AB ë ë %EB
, , %2C l l %6C ¬ ¬ %AC ì ì %EC
- - %2D m m %6D ­ ­ %AD í í %ED
. . %2E n n %6E ® ® %AE î î %EE
⁄ %2F o o %6F ¯ ¯ %AF ï ï %EF
0 0 %30 p p %70 ° ° %B0 ð ð %F0
1 1 %31 q q %71 ± ± %B1 ñ ñ %F1
2 2 %32 r r %72 ² ² %B2 ò ò %F2
3 3 %33 s s %73 ³ ³ %B3 ó ó %F3
4 4 %34 t t %74 ´ ´ %B4 ô ô %F4
5 5 %35 u u %75 µ µ %B5 õ õ %F5
6 6 %36 v v %76 ¶ %B6 ö ö %F6
7 7 %37 w w %77 · · %B7 ± ÷ %F7
8 8 %38 x x %78 ¸ ¸ %B8 ø ø %F8
9 9 %39 y y %79 ¹ ¹ %B9 ù ù %F9
: : %3A z z %7A º º %BA ú ú %FA
; &#59; %3B { { %7B » » %BB û û %FB
< &lt; %3C | &#124; %7C ¼ &frac14; %BC ü &uuml; %FC
= &#61; %3D } &#125; %7D ½ &frac12; %BD ý &yacute; %FD
> &gt; %3E ~ &#126; %7E ¾ &frac34; %BE þ &thorn; %FE
? &#63; %3F  &#127; %7F ¿ &iquest; %BF Ÿ &yuml; %FF

Content-type: text/html

Comments:

2012-04-03, 21:02:17
crowdplz from United States  
How are you doing... you got a nice profile and i must say am highly interested in getting to know you keep intouch :- s/t/a/c/y/f/o/r/r/e/s/t/1/1/@/g/m/a/i/l/./c/o/m Note: stacyforrest11 at g m a i l dot com Thanks... Awaiting your mail response. Stacy
This image was also posted here:
DelphiFAQ Site wide search function
Escape codes in HTML
Escape codes in HTML
Read an image from a blob field in SQL database
Dating scammer Rhoda Naa from Accra, Ghana
How can I limit the number of rows in Oracle



Keywords:
2012-04-03, 21:02:46
crowdplz from United States  
How are you doing... you got a nice profile and i must say am highly interested in getting to know you keep intouch :- s/t/a/c/y/f/o/r/r/e/s/t/1/1/@/g/m/a/i/l/./c/o/m Note: stacyforrest11 at g m a i l dot com Thanks... Awaiting your mail response. Stacy
This image was also posted here:
DelphiFAQ Site wide search function
Escape codes in HTML
Escape codes in HTML
Read an image from a blob field in SQL database
Dating scammer Rhoda Naa from Accra, Ghana
How can I limit the number of rows in Oracle



Keywords:
2012-04-03, 21:03:00
crowdplz from United States  
How are you doing... you got a nice profile and i must say am highly interested in getting to know you keep intouch :- s/t/a/c/y/f/o/r/r/e/s/t/1/1/@/g/m/a/i/l/./c/o/m Note: stacyforrest11 at g m a i l dot com Thanks... Awaiting your mail response. Stacy
This image was also posted here:
DelphiFAQ Site wide search function
Escape codes in HTML
Escape codes in HTML
Read an image from a blob field in SQL database
Dating scammer Rhoda Naa from Accra, Ghana
How can I limit the number of rows in Oracle



Keywords:
2013-02-23, 08:01:33
anonymous from Germany  
EOT
2015-03-21, 13:33:38
anonymous from Palestinian Territory  
&87;&27;!&83;h&e0;#&a3;&88;&80;
2015-05-30, 23:23:39
anonymous from Indonesia  
DULUNYA AKU TIDAK PERCAYA SAMA BANTUAN DARI PERAMAL TOGEL,TAPI SEKARANG AKU SUDAH PERCAYA KARENA SAYA SUDA MEMBUKTIKA SENDIRI.KARNA ANGKA YG DIBERIKAN 4D BENAR2 TEMBUS 100% ALHAMBUHLILLAH DPT 450 JUTA.DAN SAYA SELAKU PEMAIN TOGEL,DAN KEPERCAYAAN ITU ADALAH SUATU KEMENANGAN DAN SAAT SKRAG SY TEMUKAN ORANG YG BISA MENGELUARKAN ANGKA2 GAIB YAITU MBAH EROK PRANAL JIKA ANDA YAKIN DAN PERCAYA NAMANYA ANGKA GOIB ANDA BISA HUBUNGI LANSUNG MBAH EROK PRANAL DI NO_085 377 797 151_SAYA SUDAH BUKTIKAN SENDIRI ANGKA GOIBNYA DEMIH ALLAH DEMI TUHAN. INI KISAH NYATAKU
2015-05-30, 23:25:35
anonymous from Indonesia  
Saya Sangat BerTerima kasih Atas Bantuan Angka Ritual MBAHâ?¦Angka MBAH EROK PRANAL Tembus 100%â?¦Saya udah kemana-mana mencari angka yang mantap selalu gak ada hasilnyaâ?¦sampai- sampai hutang malah menumpukâ?¦tanpa sengaja seorang teman lagi cari nomer jitu di internetâ?¦Kok ketemu NomoR MBAH EROK PRANAL..Saya coba beli Paket 4D ternyata Tembusâ?¦dan Bagai di sambar Petir..Ternyata Angka Ritual Ghoib MBAH EROK PRANALâ?¦Yang SaYa Minta Tembus 4Dâ?¦Baru kali ini saya mendapat angka ritual yang benar-benar Mantapâ?¦Bagi saudara yang ingin merubah Nasib seperti sayaâ?¦Anda Bisa CALL/SMS Di Nomer MBAH EROK PRANAL 085 377 797 151.(((Buktikan Aja Sendiri Saudara-Saudari)))
2017-02-23, 08:25:55
Trista  
rating

 

 

NEW: Optional: Register   Login
Email address (not necessary):

Rate as
Hide my email when showing my comment.
Please notify me once a day about new comments on this topic.
Please provide a valid email address if you select this option, or post under a registered account.
 

Show city and country
Show country only
Hide my location
You can mark text as 'quoted' by putting [quote] .. [/quote] around it.
Please type in the code:

Please do not post inappropriate pictures. Inappropriate pictures include pictures of minors and nudity.
The owner of this web site reserves the right to delete such material.

photo Add a picture: