Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the WWW-Mechanize CPAN distribution.

Report information
The Basics
Id: 9268
Status: resolved
Priority: 0/
Queue: WWW-Mechanize

People
Owner: Nobody in particular
Requestors: abeltje [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.08
Fixed in: (no value)



Subject: Incorrect assumption for the image interface
Hi Andy, Whilst porting the 1.08 version of WWW::Mechanize to Win32::IE::Mechanize, I found you chose to specifically support <input type="submit" src="..."> for images althoug this is not according to the W3C HTML-4 standard (and I found that IE doesn't support it). I've prepared a little patch that changes this to support the valid <input type="image" src="..."> construct. hth + thanks for this great work! Abe.
diff -ru WWW-Mechanize-1.08/lib/WWW/Mechanize.pm WM-1.08_01/lib/WWW/Mechanize.pm --- WWW-Mechanize-1.08/lib/WWW/Mechanize.pm Fri Dec 24 08:03:55 2004 +++ WM-1.08_01/lib/WWW/Mechanize.pm Thu Dec 30 20:57:21 2004 @@ -1945,7 +1945,7 @@ if ( $tag eq "input" ) { my $type = $attrs->{type} or return; - return unless $type eq "submit"; + return unless $type eq "image"; } require WWW::Mechanize::Image; diff -ru WWW-Mechanize-1.08/t/image-parse.html WM-1.08_01/t/image-parse.html --- WWW-Mechanize-1.08/t/image-parse.html Tue Dec 21 03:10:08 2004 +++ WM-1.08_01/t/image-parse.html Thu Dec 30 20:59:04 2004 @@ -9,7 +9,7 @@ <IMG SRC="wango.jpg" ALT="The world of the wango"> <A HREF="http://www.cnn.com/">CNN</A> <INPUT NAME="boobala" TYPE="TEXT"> - <INPUT TYPE="submit" SRC="bongo.gif" HEIGHT=142 WIDTH=43> + <INPUT TYPE="image" SRC="bongo.gif" HEIGHT=142 WIDTH=43> </FORM> <A HREF="http://www.bbc.co.uk/" NAME="Wilma">BBC</A> <A HREF="blongo.html">Blongo!</A>
Show quoted text
> I've prepared a little patch that changes this to support the valid > <input type="image" src="..."> construct. > > hth + thanks for this great work!
Fixed. It'll be in 1.11_01.