From 45a2e3a387909a73857f00612225aebda1d1f5b1 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 14 Jan 2015 11:08:45 -0800 Subject: Rewrote beginning of Entities section. Clarified that only entities that are not in code blocks or code spans are decoded. --- spec.txt | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'spec.txt') diff --git a/spec.txt b/spec.txt index 85aaa37..db67b89 100644 --- a/spec.txt +++ b/spec.txt @@ -4145,13 +4145,12 @@ foo ## Entities With the goal of making this standard as HTML-agnostic as possible, all -valid HTML entities in any context are recognized as such and -converted into unicode characters before they are stored in the AST. - -This allows implementations that target HTML output to trivially escape -the entities when generating HTML, and simplifies the job of -implementations targetting other languages, as these will only need to -handle the unicode chars and need not be HTML-entity aware. +valid HTML entities (except in code blocks and code spans) +are recognized as such and converted into unicode characters before +they are stored in the AST. This means that renderers to formats other +than HTML need not be HTML-entity aware. HTML renderers may either escape +unicode characters as entities or leave them as they are. (However, +`"`, `&`, `<`, and `>` must always be rendered as entities.) [Named entities](@name-entities) consist of `&` + any of the valid HTML5 entity names + `;`. The @@ -4159,11 +4158,6 @@ handle the unicode chars and need not be HTML-entity aware. is used as an authoritative source of the valid entity names and their corresponding codepoints. -Conforming implementations that target HTML don't need to generate -entities for all the valid named entities that exist, with the exception -of `"` (`"`), `&` (`&`), `<` (`<`) and `>` (`>`), which -always need to be written as entities for security reasons. - .   & © Æ Ď ¾ ℋ ⅆ ∲ . -- cgit v1.2.3