Ticket #88 (closed defect: fixed)

Opened 2 years ago

Last modified 18 months ago

REXML doesn't handle spaces in XML declarations

Reported by: ser Owned by: ser
Priority: normal Milestone: 3.1.7
Component: DOM Version: 3.1.3
Severity: normal Keywords:
Cc: Ruby version: 1.8.2
Operating system: Linux

Description

Originally posted to RubyForge? as:

http://rubyforge.org/tracker/?func=detail&atid=1698&aid=6066&group_id=426

REXML cannot parse encoding if space(s) exist around equal.

% ruby -v
ruby 1.8.5 (2006-08-25) [i486-linux]

% ruby -rrexml/document -e 'puts REXML::Document.new("<?xml version=\"1.0\"
encoding=\"shift_jis\"?>")'
<?xml version='1.0' encoding='SHIFT_JIS'?>

% ruby -rrexml/document -e 'puts REXML::Document.new("<?xml version=\"1.0\" encoding
= \"shift_jis\"?>")'
<?xml version='1.0'?>
cf. Extensible Markup Language (XML) 1.0 (Second Edition):
  [80] EncodingDecl ::= S 'encoding' Eq ('"' EncName '"' | "'" EncName "'" )
  [25] Eq           ::= S? '=' S?
  [3]  S            ::= (#x20 | #x9 | #xD | #xA)+

Change History

Changed 2 years ago by ser

  • status changed from new to assigned
  • milestone set to 3.1.7

Changed 18 months ago by ser

  • status changed from assigned to closed
  • resolution set to fixed

Fixed by a cross-port from Ruby CVS, as changeset:1241

Note: See TracTickets for help on using tickets.