Created
June 30, 2010 16:47
-
-
Save kasei/458923 to your computer and use it in GitHub Desktop.
HTML::HTML5::Writer bug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use HTML::HTML5::Writer; | |
use HTML::HTML5::Parser; | |
use RDF::Trine qw(iri statement literal); | |
my $html = <<'END'; | |
<?xml version="1.0" encoding="utf-8"?> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head><title>SPARQL</title></head><body> | |
<p><code> | |
PREFIX foaf: <http://xmlns.com/foaf/0.1/><br/> | |
SELECT ?name (SAMPLE(?i) AS ?image)<br/> | |
WHERE {<br/> | |
?i a foaf:Image ; foaf:depicts [<br/> | |
a foaf:Person ;<br/> | |
foaf:name ?name<br/> | |
] .<br/> | |
} | |
</code></p> | |
</body></html> | |
END | |
my $doc = HTML::HTML5::Parser->new->parse_string($html); | |
print HTML::HTML5::Writer->new->document($doc); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Malformed UTF-8 character (fatal) at /ext/local/lib/perl5/site_perl/5.10.1/HTML/HTML5/Writer.pm line 293.