To be really XML-safe, don't emit XHTML+MathML named entities. (Ported MathML::Entities to Ruby.)

This commit is contained in:
Jacques Distler 2007-03-29 03:30:10 -05:00
parent 9b9d134ad9
commit 0db06a9fa3
3 changed files with 2142 additions and 3 deletions

View file

@ -43,7 +43,7 @@ module Engines
require_dependency 'maruku'
require_dependency 'maruku/ext/math'
html = Maruku.new(@content.delete("\r\x01-\x08\x0B\x0C\x0E-\x1F"), {:math_enabled => false}).to_html
sanitize_html(html)
sanitize_html(html).to_ncr
end
end
@ -55,7 +55,7 @@ module Engines
require_dependency 'maruku/ext/math'
html = Maruku.new(@content.delete("\r\x01-\x08\x0B\x0C\x0E-\x1F"),
{:math_enabled => true, :math_numbered => ['\\[','\\begin{equation}']}).to_html
sanitize_html(html)
sanitize_html(html).to_ncr
end
end