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:
parent
cd5c19e530
commit
5ca0760f7c
4 changed files with 100 additions and 112 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue