ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:59257] [ruby-trunk - Bug #9277][Open] REXML fails to parse comments with multiple dashes ('-') in them
@ 2013-12-21 22:47 bhollis (Ben Hollis)
  2013-12-21 22:50 ` [ruby-core:59258] [ruby-trunk - Bug #9277][Assigned] " zzak (Zachary Scott)
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: bhollis (Ben Hollis) @ 2013-12-21 22:47 UTC (permalink / raw
  To: ruby-core


Issue #9277 has been reported by bhollis (Ben Hollis).

----------------------------------------
Bug #9277: REXML fails to parse comments with multiple dashes ('-') in them
https://bugs.ruby-lang.org/issues/9277

Author: bhollis (Ben Hollis)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v: ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.3.0]
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: UNKNOWN


=begin
REXML cannot handle multiple dashes in a comment:

 require 'rexml/document'
 REXML::Document.new('<html><!-- -- --></html>')
=end

=begin
 REXML::ParseException: #<REXML::ParseException: Malformed comment
 Line: 1
 Position: 24
 Last 80 unconsumed characters:
 >
 /Users/foo/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rexml/parsers/baseparser.rb:351:in `pull_event'
 /Users/foo/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rexml/parsers/baseparser.rb:183:in `pull'
 /Users/foo/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rexml/parsers/treeparser.rb:22:in `parse'
 /Users/foo/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rexml/document.rb:283:in `build'
 /Users/foo/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rexml/document.rb:43:in `initialize'
 <extra stack trace ommitted>
 ...
 Malformed comment
 Line: 1
 Position: 24
 Last 80 unconsumed characters:
 
 Line: 1
 Position: 24
 Last 80 unconsumed characters:
 
 	from /Users/foo/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rexml/parsers/treeparser.rb:95:in `rescue in parse'  
 	from /Users/foo/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rexml/parsers/treeparser.rb:20:in `parse' 
 	from /Users/foo/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rexml/document.rb:283:in `build'
 	from /Users/foo/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rexml/document.rb:43:in `initialize'
        <extra stack trace ommitted>

=end


-- 
http://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-core:59258] [ruby-trunk - Bug #9277][Assigned] REXML fails to parse comments with multiple dashes ('-') in them
  2013-12-21 22:47 [ruby-core:59257] [ruby-trunk - Bug #9277][Open] REXML fails to parse comments with multiple dashes ('-') in them bhollis (Ben Hollis)
@ 2013-12-21 22:50 ` zzak (Zachary Scott)
  2013-12-21 23:44 ` [ruby-core:59259] [ruby-trunk - Bug #9277] " mame (Yusuke Endoh)
  2013-12-22  6:16 ` [ruby-core:59266] [ruby-trunk - Bug #9277][Rejected] " duerst (Martin Dürst)
  2 siblings, 0 replies; 4+ messages in thread
From: zzak (Zachary Scott) @ 2013-12-21 22:50 UTC (permalink / raw
  To: ruby-core


Issue #9277 has been updated by zzak (Zachary Scott).

Category set to lib
Status changed from Open to Assigned
Assignee set to kou (Kouhei Sutou)


----------------------------------------
Bug #9277: REXML fails to parse comments with multiple dashes ('-') in them
https://bugs.ruby-lang.org/issues/9277#change-43812

Author: bhollis (Ben Hollis)
Status: Assigned
Priority: Normal
Assignee: kou (Kouhei Sutou)
Category: lib
Target version: 
ruby -v: ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.3.0]
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: UNKNOWN


=begin
REXML cannot handle multiple dashes in a comment:

 require 'rexml/document'
 REXML::Document.new('<html><!-- -- --></html>')
=end

=begin
 REXML::ParseException: #<REXML::ParseException: Malformed comment
 Line: 1
 Position: 24
 Last 80 unconsumed characters:
 >
 /Users/foo/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rexml/parsers/baseparser.rb:351:in `pull_event'
 /Users/foo/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rexml/parsers/baseparser.rb:183:in `pull'
 /Users/foo/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rexml/parsers/treeparser.rb:22:in `parse'
 /Users/foo/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rexml/document.rb:283:in `build'
 /Users/foo/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rexml/document.rb:43:in `initialize'
 <extra stack trace ommitted>
 ...
 Malformed comment
 Line: 1
 Position: 24
 Last 80 unconsumed characters:
 
 Line: 1
 Position: 24
 Last 80 unconsumed characters:
 
 	from /Users/foo/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rexml/parsers/treeparser.rb:95:in `rescue in parse'  
 	from /Users/foo/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rexml/parsers/treeparser.rb:20:in `parse' 
 	from /Users/foo/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rexml/document.rb:283:in `build'
 	from /Users/foo/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rexml/document.rb:43:in `initialize'
        <extra stack trace ommitted>

=end


-- 
http://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-core:59259] [ruby-trunk - Bug #9277] REXML fails to parse comments with multiple dashes ('-') in them
  2013-12-21 22:47 [ruby-core:59257] [ruby-trunk - Bug #9277][Open] REXML fails to parse comments with multiple dashes ('-') in them bhollis (Ben Hollis)
  2013-12-21 22:50 ` [ruby-core:59258] [ruby-trunk - Bug #9277][Assigned] " zzak (Zachary Scott)
@ 2013-12-21 23:44 ` mame (Yusuke Endoh)
  2013-12-22  6:16 ` [ruby-core:59266] [ruby-trunk - Bug #9277][Rejected] " duerst (Martin Dürst)
  2 siblings, 0 replies; 4+ messages in thread
From: mame (Yusuke Endoh) @ 2013-12-21 23:44 UTC (permalink / raw
  To: ruby-core


Issue #9277 has been updated by mame (Yusuke Endoh).


As I recall correctly, the XML spec does not allow "--" in a comment.

http://en.wikipedia.org/wiki/XML#Comments

> The string "--" (double-hyphen) is not allowed inside comments

-- 
Yusuke Endoh <mame@tsg.ne.jp>
----------------------------------------
Bug #9277: REXML fails to parse comments with multiple dashes ('-') in them
https://bugs.ruby-lang.org/issues/9277#change-43813

Author: bhollis (Ben Hollis)
Status: Assigned
Priority: Normal
Assignee: kou (Kouhei Sutou)
Category: lib
Target version: 
ruby -v: ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.3.0]
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: UNKNOWN


=begin
REXML cannot handle multiple dashes in a comment:

 require 'rexml/document'
 REXML::Document.new('<html><!-- -- --></html>')
=end

=begin
 REXML::ParseException: #<REXML::ParseException: Malformed comment
 Line: 1
 Position: 24
 Last 80 unconsumed characters:
 >
 /Users/foo/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rexml/parsers/baseparser.rb:351:in `pull_event'
 /Users/foo/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rexml/parsers/baseparser.rb:183:in `pull'
 /Users/foo/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rexml/parsers/treeparser.rb:22:in `parse'
 /Users/foo/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rexml/document.rb:283:in `build'
 /Users/foo/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rexml/document.rb:43:in `initialize'
 <extra stack trace ommitted>
 ...
 Malformed comment
 Line: 1
 Position: 24
 Last 80 unconsumed characters:
 
 Line: 1
 Position: 24
 Last 80 unconsumed characters:
 
 	from /Users/foo/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rexml/parsers/treeparser.rb:95:in `rescue in parse'  
 	from /Users/foo/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rexml/parsers/treeparser.rb:20:in `parse' 
 	from /Users/foo/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rexml/document.rb:283:in `build'
 	from /Users/foo/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rexml/document.rb:43:in `initialize'
        <extra stack trace ommitted>

=end


-- 
http://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-core:59266] [ruby-trunk - Bug #9277][Rejected] REXML fails to parse comments with multiple dashes ('-') in them
  2013-12-21 22:47 [ruby-core:59257] [ruby-trunk - Bug #9277][Open] REXML fails to parse comments with multiple dashes ('-') in them bhollis (Ben Hollis)
  2013-12-21 22:50 ` [ruby-core:59258] [ruby-trunk - Bug #9277][Assigned] " zzak (Zachary Scott)
  2013-12-21 23:44 ` [ruby-core:59259] [ruby-trunk - Bug #9277] " mame (Yusuke Endoh)
@ 2013-12-22  6:16 ` duerst (Martin Dürst)
  2 siblings, 0 replies; 4+ messages in thread
From: duerst (Martin Dürst) @ 2013-12-22  6:16 UTC (permalink / raw
  To: ruby-core


Issue #9277 has been updated by duerst (Martin Dürst).

Status changed from Assigned to Rejected
Assignee deleted (kou (Kouhei Sutou))

mame (Yusuke Endoh) wrote:
> As I recall correctly, the XML spec does not allow "--" in a comment.

Yes indeed. See http://www.w3.org/TR/xml/#sec-comments:

"For compatibility, the string " -- " (double-hyphen) MUST NOT occur within comments."


As for the phrase "for compatibility", this is what the spec says (http://www.w3.org/TR/xml/#dt-compat):
"for compatibility  [Definition: Marks a sentence describing a feature of XML included solely to ensure that XML remains compatible with SGML.]"

So I have rejected this bug.
----------------------------------------
Bug #9277: REXML fails to parse comments with multiple dashes ('-') in them
https://bugs.ruby-lang.org/issues/9277#change-43826

Author: bhollis (Ben Hollis)
Status: Rejected
Priority: Normal
Assignee: 
Category: lib
Target version: 
ruby -v: ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.3.0]
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: UNKNOWN


=begin
REXML cannot handle multiple dashes in a comment:

 require 'rexml/document'
 REXML::Document.new('<html><!-- -- --></html>')
=end

=begin
 REXML::ParseException: #<REXML::ParseException: Malformed comment
 Line: 1
 Position: 24
 Last 80 unconsumed characters:
 >
 /Users/foo/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rexml/parsers/baseparser.rb:351:in `pull_event'
 /Users/foo/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rexml/parsers/baseparser.rb:183:in `pull'
 /Users/foo/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rexml/parsers/treeparser.rb:22:in `parse'
 /Users/foo/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rexml/document.rb:283:in `build'
 /Users/foo/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rexml/document.rb:43:in `initialize'
 <extra stack trace ommitted>
 ...
 Malformed comment
 Line: 1
 Position: 24
 Last 80 unconsumed characters:
 
 Line: 1
 Position: 24
 Last 80 unconsumed characters:
 
 	from /Users/foo/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rexml/parsers/treeparser.rb:95:in `rescue in parse'  
 	from /Users/foo/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rexml/parsers/treeparser.rb:20:in `parse' 
 	from /Users/foo/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rexml/document.rb:283:in `build'
 	from /Users/foo/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rexml/document.rb:43:in `initialize'
        <extra stack trace ommitted>

=end


-- 
http://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-12-22  6:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-21 22:47 [ruby-core:59257] [ruby-trunk - Bug #9277][Open] REXML fails to parse comments with multiple dashes ('-') in them bhollis (Ben Hollis)
2013-12-21 22:50 ` [ruby-core:59258] [ruby-trunk - Bug #9277][Assigned] " zzak (Zachary Scott)
2013-12-21 23:44 ` [ruby-core:59259] [ruby-trunk - Bug #9277] " mame (Yusuke Endoh)
2013-12-22  6:16 ` [ruby-core:59266] [ruby-trunk - Bug #9277][Rejected] " duerst (Martin Dürst)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).