Skip Menu |
 

This queue is for tickets about the XML-LibXML CPAN distribution.

Report information
The Basics
Id: 53270
Status: resolved
Priority: 0/
Queue: XML-LibXML

People
Owner: Nobody in particular
Requestors: michael [...] dynamine.net
Cc:
AdminCc:

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



Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by diesel.bestpractical.com (Postfix) with SMTP id 5B2044D80DE for <bug-XML-LibXML [...] rt.cpan.org>; Thu, 31 Dec 2009 21:39:03 -0500 (EST)
Received: (qmail 17457 invoked by uid 103); 1 Jan 2010 02:39:02 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 1 Jan 2010 02:39:02 -0000
Received: from mail-yw0-f172.google.com (HELO mail-yw0-f172.google.com) (209.85.211.172) by 16.mx.develooper.com (qpsmtpd/0.80) with ESMTP; Thu, 31 Dec 2009 18:39:00 -0800
Received: by ywh2 with SMTP id 2so13984100ywh.27 for <bug-XML-LibXML [...] rt.cpan.org>; Thu, 31 Dec 2009 18:38:57 -0800 (PST)
Received: by 10.150.213.18 with SMTP id l18mr29182199ybg.183.1262313537659; Thu, 31 Dec 2009 18:38:57 -0800 (PST)
Delivered-To: cpan-bug+XML-LibXML [...] diesel.bestpractical.com
Subject: suppress_errors option not honored by load_html() method if set in parser object
MIME-Version: 1.0
X-Spam-Status: No, hits=0.0 required=8.0 tests=HTML_MESSAGE,SPF_PASS
Return-Path: <michael [...] dynamine.net>
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-XML-LibXML [...] rt.cpan.org
Date: Thu, 31 Dec 2009 18:38:57 -0800
X-Spam-Level: *
X-Virus-Checked: Checked by ClamAV on 16.mx.develooper.com
Content-Type: multipart/alternative; boundary=000e0cd3580a01e30a047c11467b
Message-ID: <d002c4030912311838l9c4e2e8y3c5de2d99351b223 [...] mail.gmail.com>
To: bug-XML-LibXML [...] rt.cpan.org
From: Michael Fischer <michael [...] dynamine.net>
Content-Length: 0
content-type: text/plain; charset="utf-8"
X-RT-Original-Encoding: ISO-8859-1
Content-Length: 853
Download (untitled) / with headers
text/plain 853b
These two code fragments behave differently, though arguably they should behave identically: # # Case 1: Fails - suppress_errors option appears to be ignored # (but strangely, recover is honored) # my $url = "http://finance.yahoo.com"; my $mech = WWW::Mechanize->new(); my $parser = XML::LibXML->new(); $parser->set_option("recover", 1); $parser->set_option("suppress_errors", 1); my $dom = $parser->load_html(string => $mech->content()); # # Case 2: Succeeds - suppress_errors option honored correctly # my $url = "http://finance.yahoo.com"; my $mech = WWW::Mechanize->new(); my $parser = XML::LibXML->new(); my $dom = $parser->load_html(string => $mech->content(), recover => 1, suppress_errors => 1); Not sure what's going on here. Must be something in _parse_html_string() ?
content-type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: ISO-8859-1
Content-Length: 1371
MIME-Version: 1.0
In-Reply-To: <d002c4030912311838l9c4e2e8y3c5de2d99351b223 [...] mail.gmail.com>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <d002c4030912311838l9c4e2e8y3c5de2d99351b223 [...] mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-9059-1309367191-363.53270-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 298
Download (untitled) / with headers
text/plain 298b
Thanks for the report - this is now fixed in the bitbucket repository: https://bitbucket.org/shlomif/perl-xml-libxml It will be available in the next CPAN release. In the process of investigating this bug, I found several similar bugs in the Perl code, so thanks again. Regards, -- Shlomi Fish


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.