Efficiency: Sanitize Once

Envoke the HTML5lib Sanitizer just once (when the content is finally rendered),
rather than each time it passes through the chunk-handler.
This commit is contained in:
Jacques Distler 2008-05-15 01:22:13 -05:00
parent cd5c19e530
commit 5ca0760f7c
4 changed files with 100 additions and 112 deletions

View file

@ -80,7 +80,7 @@ class FileControllerTest < Test::Unit::TestCase
renderer = PageRenderer.new
@wiki.revise_page('wiki1', 'HomePage', '[[rails-e2e.gif:pic]]',
Time.now, 'AnonymousBrave', renderer)
assert_equal "<p><span class=\"newWikiWord\">rails-e2e.gif<a href=\"../file/rails-e2e.gif\">" +
assert_equal "<p><span class='newWikiWord'>rails-e2e.gif<a href='../file/rails-e2e.gif'>" +
"?</a></span></p>",
renderer.display_content