Bugs: Browse | Submit New | Admin

[#25921] Problem with XML tags with namespace in Ruby 1.9.1

Date:
2009-05-15 17:12
Priority:
3
Submitted By:
Thomas Leitner (gettalong)
Assigned To:
Andrea Censi (andrea)
Category:
Markdown Parser
State:
Open
Summary:
Problem with XML tags with namespace in Ruby 1.9.1

Detailed description
When parsing something like

    <webgen:block name="content" />

the used REXML parser throws and UndefinedNamespaceException:

 ___________________________________________________________________________
| Maruku tells you:
+---------------------------------------------------------------------------
| REXML cannot parse this block of HTML/XML:
| |<marukuwrap><div>
| |
| |  <webgen:block name='summary' />
| |
| |</div></marukuwrap>
| #<REXML::UndefinedNamespaceException: Undefined prefix webgen found>
+---------------------------------------------------------------------------
!/Users/thomasleitner/.multiruby/install/mri_rel_1_9/lib/ruby/gems/1.9.1/gems/maruku-0.6.0/lib/maruku/errors_management.
rb:56:in `maruku_recover'
!/Users/thomasleitner/.multiruby/install/mri_rel_1_9/lib/ruby/gems/1.9.1/gems/maruku-0.6.0/lib/maruku/helpers.rb:97:in
`rescue in md_html'
!/Users/thomasleitner/.multiruby/install/mri_rel_1_9/lib/ruby/gems/1.9.1/gems/maruku-0.6.0/lib/maruku/helpers.rb:85:in
`md_html'
!/Users/thomasleitner/.multiruby/install/mri_rel_1_9/lib/ruby/gems/1.9.1/gems/maruku-0.6.0/lib/maruku/input/parse_block.
rb:255:in `read_raw_html'
!/Users/thomasleitner/.multiruby/install/mri_rel_1_9/lib/ruby/gems/1.9.1/gems/maruku-0.6.0/lib/maruku/input/parse_block.
rb:88:in `parse_blocks'
\___________________________________________________________________________

Maruku should probably allow the parsing of namespaced XML/HTML tags even if no xmlns for the namespace is defined.

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item