Processing remove_javascript
At present the remove_javascript directive is implemented in _postprocess_html. Unless there is a compelling reason to leave that processing there I suggest it be moved to where remove_tags is implemented. The reason for this is that in preprocess_html, script tags (within other tags) containing jQuery code result in self.tag_to_string on an outer tag returning fragments of the jQuery code as well as the expected string content. So the processing in a custom preprocess_html doesn't work as expected.
When I added 'script' to my remove_tags list the problem went away. This is a completely effective workaround, but recipe writers might expect remove_javascript to be equivalent to including 'script' in the remove_tags list which it currently is not.
|