Skip to content

Arrays of allowed elements/attributes/etc. in sanitizer not overridable in subclass (Ruby) #46

Description

@GoogleCodeExporter
html5lib/sanitizer.rb hints that users can subclass HTMLSanitizer and
define their own constants for the array of allowable elements, attributes,
CSS properties, &c. But a subclass that defines its own constants for any
of these arrays doesn't override the built-in constants. I think this has
to do with the way Ruby looks up constants from methods defined in modules.
In any case, one fix is to use the Module#const_get method in place of
direct constant access where they appear in the
HTMLSanitizeModule#sanitize_token and HTMLSanitizeModule#sanitize_css methods.

Original issue reported on code.google.com by paulsm...@gmail.com on 20 Jun 2007 at 11:25

Attachments:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions