Which characters need to be escaped in HTML?
问题 Are they the same as XML, perhaps plus the space one ( )? I've found some huge lists of HTML escape characters but I don't think they must be escaped. I want to know what needs to be escaped. 回答1: If you're inserting text content in your document in a location where text content is expected 1 , you typically only need to escape the same characters as you would in XML. Inside of an element, this just includes the entity escape ampersand & and the element delimiter less-than and greater-than