Browse Source
At the top level of the document, the _HashHTMLBlocks function gets called to sequester raw top-level html blocks from being processed. As a result, anything in these top-level blocks escapes general Markdown processing except that if XML validation has been enabled (the default), the final result of processing does always pass through a validation stage. On the one hand that's good as it allows raw HTML in Markdown docs, but on the other hand, some basic fix ups are not happening and that's bad. Rather than try and push all of the top-level raw HTML block content through either _RunBlockGamut or _RunSpanGamut (thereby somewhat defeating the point of allowing raw HTML top-level blocks in the first place), use a compromise between the two extremes and push all the text of raw HTML block content through just the _EncodeAmpsAndAngles function. This causes things like non-html-escaped ampersands (&) inside "href" and "src" attributes to magically be transformed into "&" and at the same time any url adjustment options (i.e. -r, -i, -b, -a) to be applied. The result produces better and less surprising outcomes than before. Signed-off-by: Kyle J. McKay <mackyle@gmail.com>master
Kyle J. McKay
4 years ago
1 changed files with 13 additions and 7 deletions
Loading…
Reference in new issue