rfc:decode_html

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
rfc:decode_html [2024/09/06 18:56] – Expanded context list and documented new Enum dmsnellrfc:decode_html [2024/09/06 18:58] (current) – Fix list bullet syntax. dmsnell
Line 125: Line 125:
 A new enum specifies supported HTML contexts. For the most part the enum specifies three internal properties: A new enum specifies supported HTML contexts. For the most part the enum specifies three internal properties:
  
- Are character references decoded? +  * Are character references decoded? 
- Are ambiguous ampersand references interpreted? +  Are ambiguous ampersand references interpreted? 
- Are NULL bytes replace or removed?+  Are NULL bytes replace or removed?
  
 While these could be handled via three boolean flags, that would require developers to understand the nuances involved in the different situations where they imply. By focusing the API on the kind of situations developers work in, the burden is removed to know the internal details of HTML parsing. For this reason there is overlap in ''Script'', ''Style'', and ''Comment'' contexts, because the parsing rules are identical. While these could be handled via three boolean flags, that would require developers to understand the nuances involved in the different situations where they imply. By focusing the API on the kind of situations developers work in, the burden is removed to know the internal details of HTML parsing. For this reason there is overlap in ''Script'', ''Style'', and ''Comment'' contexts, because the parsing rules are identical.
rfc/decode_html.txt · Last modified: 2024/09/06 18:58 by dmsnell