Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > bug in SGML parser

Reply
Thread Tools

bug in SGML parser

 
 
cesium62@yahoo.com
Guest
Posts: n/a
 
      12-07-2006
The sgml parser
/usr/local/lib/ruby/gems/1.8/gems/htmltools-1.10/lib/html/sgml-parser.rb
does not correctly handle character references. Yahoo sometimes
generates a character reference that looks like "'". Firefox
displays this as a single quote. sgml-parser.rb raises an exception.

rescued: invalid value for Integer: "039" at Wed Dec 06 18:02:56 PST
2006
/usr/local/lib/ruby/gems/1.8/gems/htmltools-1.10/lib/html/sgml-parser.rb:335:in
`Integer'/usr/local/lib/ruby/gems/1.8/gems/htmltools-1.10/lib/html/sgml-parser.rb:335:in
`handle_charref'/usr/local/lib/ruby/gems/1.8/gems/htmltools-1.10/lib/html/sgml-parser.rb:159:in
`goahead'/usr/local/lib/ruby/gems/1.8/gems/htmltools-1.10/lib/html/sgml-parser.rb:88:in
`feed'/usr/local/lib/ruby/gems/1.8/gems/rubyful_soup-1.0.4/lib/rubyful_soup.rb:547:in
`feed'/usr/local/lib/ruby/gems/1.8/gems/rubyful_soup-1.0.4/lib/rubyful_soup.rb

Possible fix: In handle_charref, strip leading zeroes from 'name'
prior to calling 'Integer'.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SGML and other issues in parser for web browser Surendra Singhi Firefox 0 02-22-2005 09:47 AM
SGML Parser doesn't like <script> contents? (Pete Cresswell) HTML 30 12-27-2004 02:10 AM
Validating SGML parser? Benjamin Niemann Python 2 08-22-2004 12:06 PM
Good SGML DTD viewer *or* tool for translating SGML DTDs to XML DTDs Clifford W. Racz XML 4 02-13-2004 06:24 PM
HTML-Parser / SGML-Parser Zach Dennis Ruby 5 10-01-2003 07:26 PM



Advertisments