Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

have_tag/assert_select does not validate XML with periods in attribute names

#60

While creating specs for a method to generate valid GraphML, I needed to use attributes with periods ('.') in their names (i.e. ''). However, as it stands, assert_select uses the HTML::Node.parse method to parse its input. This method does not allow periods in attribute names (the valid characters are represented by the regex /[-\w:\]+/). My temporary solution was to monkeypatch the HTML::Node.parse method in my spec_helpers.rb to accept periods by changing the regex to read /[-\w:\.]+/. However, that is obviously not a reasonable solution.

Is anyone aware of this issue? If so, is it a problem inherent in Rails or am I missing some kind of alternative XML parser which allows for this syntax?

Thanks all!

Reported by T.J. VanSlyke · April 28th, 2008 @ 05:25 PM

State: invalid
Milestone: none
Assigned to: nobody
Importance: none

Activity

  1. josh
    josh
    • State changed from new to invalid

    I'd ask around on the Ruby on Rails mailing list.

    June 13th, 2008 @ 06:46 AM