Skip Menu |

This queue is for tickets about the HTML-HTML5-Parser CPAN distribution.

Report information
The Basics
Id: 88636
Status: patched
Priority: 0/
Queue: HTML-HTML5-Parser

Owner: perl [...]
Requestors: NGLENN [...]

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

Subject: File not resolved properly without a space in the path
Download (untitled) / with headers
text/plain 796b
The parse_html_file method dies with "HTTP response code was not 200 OK. (Set $opts{ignore_http_response_code} to ignore this error.)" if the input file path does not have a space: use HTML::HTML5::Parser; my $parser = HTML::HTML5::Parser->new; my $doc = $parser->parse_html_file('C:\no\space\foo.html'); #dies # my $doc = $parser->parse_html_file('C:\some space\bar.html');#doesn't die The problem is with line 44. It checks if the path matches a regex (which doesn't allow spaces in it), and if it does then you call URI->new instead of URI::file->new_abs. For files, apparently URI::file->new_abs is the way to go, but this doesn't happen unless there's a space in the file name. For now my work around is $parser->parse_html_file(URI::file->new_abs('C:\no\space\foo.html'))
Patched in repo to use this regexp: /^[a-z][a-z0-9_\.\+-]+:\S+$/i

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

Please report any issues with to