https://www.cnblogs.com/wobeinianqing/p/7067547.html
https://www.cnblogs.com/gyfluck/p/12558079.html
1
2
3
| http://www.test.com/index.php?id=1×tamp=1584947618&age=10
http://www.test.com/index.php?id=1×tamp=1584947618&age=10
|
htmlspecialchars
使用htmlspecialchars()函数,把预定义的字符 转成 HTML 实体
1
2
3
| echo htmlspecialchars($url);
http://www.test.com/index.php?id=1×tamp=1584947618&age=10
|
手动转换
No. | 文字表記 | 10進表記 | 16進表記 | 文字 | | Comment |
001 |
" |
" |
" |
""" |
|
quotation mark = APL quote |
002 |
& |
& |
& |
"&" |
|
ampersand |
003 |
< |
< |
< |
"<" |
|
less-than sign |
004 |
> |
> |
> |
">" |
|
greater-than sign |
005 |
|
  |
  |
" " |
|
no-break space = non-breaking space |
char glyph | HTML tag |
|
|
¡ |
¡ |
¢ |
¢ |
£ |
£ |
¤ |
¤ |
¥ |
¥ |
¦ |
¦ |
§ |
§ |
¨ |
¨ |
© |
© |
ª |
ª |
« |
« |
¬ |
¬ |
|
­ |
® |
® |
¯ |
¯ |
° |
° |
± |
± |
² |
² |
³ |
³ |
´ |
´ |
µ |
µ |
¶ |
¶ |
· |
· |
¸ |
¸ |
¹ |
¹ |
º |
º |
» |
» |
¼ |
¼ |
½ |
½ |
¾ |
¾ |
¿ |
¿ |
À |
À |
Á |
Á |
 |
 |
à |
à |
Ä |
Ä |
Å |
Å |
Æ |
Æ |
Ç |
Ç |
È |
È |
É |
É |
Ê |
Ê |
Ë |
Ë |
Ì |
Ì |
Í |
Í |
Î |
Î |
Ï |
Ï |
Ð |
Ð |
Ñ |
Ñ |
Ò |
Ò |
Ó |
Ó |
Ô |
Ô |
Õ |
Õ |
Ö |
Ö |
× |
× |
Ø |
Ø |
Ù |
Ù |
Ú |
Ú |
Û |
Û |
Ü |
Ü |
Ý |
Ý |
Þ |
Þ |
ß |
ß |
à |
à |
á |
á |
â |
â |
ã |
ã |
ä |
ä |
å |
å |
æ |
æ |
ç |
ç |
è |
è |
é |
é |
ê |
ê |
ë |
ë |
ì |
ì |
í |
í |
î |
î |
ï |
ï |
ð |
ð |
ñ |
ñ |
ò |
ò |
ó |
ó |
ô |
ô |
õ |
õ |
ö |
ö |
÷ |
÷ |
ø |
ø |
ù |
ù |
ú |
ú |
û |
û |
ü |
ü |
ý |
ý |
þ |
þ |
ÿ |
ÿ |
Math symbols
Latin Extended-B
char glyph | HTML tag |
ƒ |
ƒ |
Arrows
char glyph | HTML tag |
← |
← |
↑ |
↑ |
→ |
→ |
↓ |
↓ |
↔ |
↔ |
↵ |
↵ |
⇐ |
⇐ |
⇑ |
⇑ |
⇒ |
⇒ |
⇓ |
⇓ |
⇔ |
⇔ |
Mathematical Operators
char glyph | HTML tag |
∀ |
∀ |
∂ |
∂ |
∃ |
∃ |
∅ |
∅ |
∇ |
∇ |
∈ |
∈ |
∉ |
∉ |
∋ |
∋ |
∏ |
∏ |
∑ |
∑ |
− |
− |
∗ |
∗ |
√ |
√ |
∝ |
∝ |
∞ |
∞ |
∠ |
∠ |
∧ |
∧ |
∨ |
∨ |
∩ |
∩ |
∪ |
∪ |
∫ |
∫ |
∴ |
∴ |
∼ |
∼ |
≅ |
≅ |
≈ |
≈ |
≠ |
≠ |
≡ |
≡ |
≤ |
≤ |
≥ |
≥ |
⊂ |
⊂ |
⊃ |
⊃ |
⊄ |
⊄ |
⊆ |
⊆ |
⊇ |
⊇ |
⊕ |
⊕ |
⊗ |
⊗ |
⊥ |
⊥ |
⋅ |
⋅ |
General Punctuation
char glyph | HTML tag |
• |
• |
… |
… |
′ |
′ |
″ |
″ |
‾ |
‾ |
⁄ |
⁄ |
Miscellaneous Technical
char glyph | HTML tag |
⌈ |
⌈ |
⌉ |
⌉ |
⌊ |
⌊ |
⌋ |
⌋ |
⟨ |
⟨ |
⟩ |
⟩ |
Geometric Shapes
char glyph | HTML tag |
◊ |
◊ |
Miscellaneous Symbols
char glyph | HTML tag |
♠ |
♠ |
♣ |
♣ |
♥ |
♥ |
♦ |
♦ |
Letterlike Symbols
char glyph | HTML tag |
℘ |
℘ |
ℑ |
ℑ |
ℜ |
ℜ |
™ |
™ |
ℵ |
ℵ |
Greek
char glyph | HTML tag |
Α |
Α |
Β |
Β |
Γ |
Γ |
Δ |
Δ |
Ε |
Ε |
Ζ |
Ζ |
Η |
Η |
Θ |
Θ |
Ι |
Ι |
Κ |
Κ |
Λ |
Λ |
Μ |
Μ |
Ν |
Ν |
Ξ |
Ξ |
Ο |
Ο |
Π |
Π |
Ρ |
Ρ |
Σ |
Σ |
Τ |
Τ |
Υ |
Υ |
Φ |
Φ |
Χ |
Χ |
Ψ |
Ψ |
Ω |
Ω |
α |
α |
β |
β |
γ |
γ |
δ |
δ |
ε |
ε |
ζ |
ζ |
η |
η |
θ |
θ |
ι |
ι |
κ |
κ |
λ |
λ |
μ |
μ |
ν |
ν |
ξ |
ξ |
ο |
ο |
π |
π |
ρ |
ρ |
ς |
ς |
σ |
σ |
τ |
τ |
υ |
υ |
φ |
φ |
χ |
χ |
ψ |
ψ |
ω |
ω |
ϑ |
ϑ |
ϒ |
ϒ |
ϖ |
ϖ |
Special characters for HTML
C0 Controls and Basic Latin
char glyph | HTML tag |
" |
" |
& |
& |
< |
< |
> |
> |
Latin Extended-A
char glyph | HTML tag |
Œ |
Œ |
œ |
œ |
Š |
Š |
š |
š |
Ÿ |
Ÿ |
Spacing Modifier Letters
char glyph | HTML tag |
ˆ |
ˆ |
˜ |
˜ |
General Punctuation
char glyph | HTML tag |
|
  |
|
  |
|
  |
|
‌ |
|
‍ |
|
‎ |
|
‏ |
– |
– |
— |
— |
‘ |
‘ |
’ |
’ |
‚ |
‚ |
“ |
“ |
” |
” |
„ |
„ |
† |
† |
‡ |
‡ |
‰ |
‰ |
‹ |
‹ |
› |
› |
€ |
€ |