Why is “®” being rendered as “®” without the bounding semicolon

前端 未结 8 432
孤街浪徒
孤街浪徒 2020-11-30 06:14

I\'ve been running into a problem that was revealed through our Google adwords-driven marketing campaign. One of the standard parameters used is \"region\". When a user se

8条回答
  •  独厮守ぢ
    2020-11-30 06:54

    1: The following markup is invalid in the first place (use the W3C Markup Validation Service to verify):

    
    

    In the above example, the & character should be encoded as &, like so:

    
    

    2: Browsers are tolerant; they try to make sense out of broken HTML. In your case, all possibly valid HTML entities are converted to HTML entities.

提交回复
热议问题