New Sanitizer Goes Live
The new sanitizer seems to work well (cuts the time required to produce the Instiki Atom feed in half). Our strategy is to use HTML5lib for <nowiki> content, but to use the new sanitizer for content that has been processed by Maruku (and hence is well-formed). The one broken unit test won't affect us (since it dealt with very malformed HTML).
This commit is contained in:
parent
800880f382
commit
45405fc97e
8 changed files with 24 additions and 16 deletions
|
@ -5,7 +5,6 @@ require_dependency 'chunks/include'
|
|||
require_dependency 'chunks/wiki'
|
||||
require_dependency 'chunks/literal'
|
||||
require 'chunks/nowiki'
|
||||
require 'sanitize'
|
||||
|
||||
# Wiki content is just a string that can process itself with a chain of
|
||||
# actions. The actions can modify wiki content so that certain parts of
|
||||
|
@ -113,8 +112,9 @@ end
|
|||
|
||||
class WikiContent < String
|
||||
|
||||
require 'sanitizer'
|
||||
include ChunkManager
|
||||
include Sanitize
|
||||
include Sanitizer
|
||||
|
||||
DEFAULT_OPTS = {
|
||||
:active_chunks => ACTIVE_CHUNKS,
|
||||
|
@ -193,7 +193,7 @@ class WikiContent < String
|
|||
chunk.unmask_text
|
||||
end
|
||||
end
|
||||
self.replace sanitize_xhtml(self)
|
||||
self.replace xhtml_sanitize(self)
|
||||
end
|
||||
|
||||
def page_name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue