Class: Oga::XML::Generator
- Inherits:
-
Object
- Object
- Oga::XML::Generator
- Defined in:
- lib/monkey_patch/oga_document.rb
Instance Method Summary collapse
Instance Method Details
#on_text(node, output) ⇒ Object
57 58 59 60 61 62 63 |
# File 'lib/monkey_patch/oga_document.rb', line 57 def on_text(node, output) if @html_mode && (parent = node.parent) && parent.literal_html_name? output << node.text.encode('utf-8') else output << Entities.encode(node.text).encode('utf-8') end end |