History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: WTR-190
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Angrez
Reporter: Christian Fraenkel
Votes: 1
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Watir

Watir can generate invalid attributes in tags which makes rexml raise an exception [patch]

Created: 13/Dec/07 06:15 AM   Updated: 10/Jun/08 02:11 PM
Component/s: Xpath Support
Affects Version/s: 1.5.3
Fix Version/s: 1.6.1

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
File Attachments: 1. Text File patch.txt (0.5 kb)

Environment: Windows XP Sp2


 Description  « Hide
in watir/ie.rb, all_tag_attributes, the used regex to filter attribute names is not restrictive enough - it allows every printable char in attribute names (which can lead to attributes like 'false;?="false;?"' for example).
A better regex that will not exhibit that problem would be /^[\w:][\w0-9.\-:]*$/

I posted about this in the watir group: http://groups.google.com/group/watir-general/browse_thread/thread/454ba4d8bb4ea8b4

 All   Comments   Work Log   Change History      Sort Order:
Christian Fraenkel - 13/Dec/07 06:27 AM
patch that restricts the above regex a lot more

Bret Pettichord - 06/Jan/08 01:30 PM
Angrez,

What do you think about this patch?

Bret

Angrez - 07/Jan/08 01:14 AM
Hi Bret,

I'll look at the patch & will get back to you soon.

- Angrez

Alan Baird - 03/Jun/08 01:37 PM
FWIW I am using this patch and it fixed my problem. I haven't done any tests specifically to ensure it broke other things though.

Angrez - 04/Jun/08 01:40 AM
Hi Alan,

Can you provide some test case or scenario in which existing xpath didn't work but by applying your patch it works? As of now we didn't face this difficulty in any of our test cases. It would be great if we include some test cases that test this patch.

- Angrez