Class: EscapeParser
- Inherits:
-
Object
- Object
- EscapeParser
- Defined in:
- lib/ribit/contentparser.rb
Instance Method Summary collapse
Instance Method Details
#parse(text, contentDoc) ⇒ Object
272 273 274 275 276 277 278 279 280 281 282 |
# File 'lib/ribit/contentparser.rb', line 272 def parse( text, contentDoc ) # we need to escape all <,>,',",& text.gsub!( /&/, '&' ) text.gsub!( /</, '<' ) text.gsub!( />/, '>' ) text.gsub!( /\"/, '"' ) text.gsub!( /\'/, ''' ) return [ TextContainer.new( text ) ] end |