Rough In New Sanitizer
Start work (which may not pan out) on a new sanitizer. Right now, it passes all but 1 of the HTML5lib Sanitizer's unit tests. But it doesn't do much of anything to ensure well-formedness. This is not an issue for Maruku-processed content, but it is a concern for <nowiki> blocks. (One solution would be to use the HTML5lib parser on <nowiki> blocks.) In any case, this baby is 3 times as fast as the HTML5lib sanitizer.
This commit is contained in:
parent
f8e74e53bd
commit
800880f382
15 changed files with 3657 additions and 12 deletions
|
@ -7,8 +7,6 @@ require_dependency 'chunks/literal'
|
|||
require 'chunks/nowiki'
|
||||
require 'sanitize'
|
||||
|
||||
include 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
|
||||
# it are protected from being rendered by later actions.
|
||||
|
@ -116,6 +114,7 @@ end
|
|||
class WikiContent < String
|
||||
|
||||
include ChunkManager
|
||||
include Sanitize
|
||||
|
||||
DEFAULT_OPTS = {
|
||||
:active_chunks => ACTIVE_CHUNKS,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue