Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

HTML escape character

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

In HTML, a string containing special characters (such as &) is to be displayed on the page, because it will be regarded as the tag structure of HTML when added to the text node, resulting in some errors, so these special characters should be escaped.

For example, in

Tag, add a string "alert ('hello')", and escape the string.

The escape string (Escape Sequence), that is, the character Character Entity, is divided into three parts: the first part is a & symbol, the English part is called ampersand;, the second part is the Entity name or # plus the Entity number; the third part is a semicolon.

For example, to display a less than sign (greater than > >)

& & symbol &

"double quotes"

'single quotation marks & apos

Copyright ©©

Registered trademark ®®

Trademark (USA) ™

× multiplication sign × ×

/ division sign / /

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report