-
-
Save omega/7dbab8cbfff3451d8e3d to your computer and use it in GitHub Desktop.
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
my $body = $dom->parse($self->data)->find('html body')->[0]; | |
return unless $body; | |
# Re-write links XXX: This is ugly! | |
$body->find->('a[href]')->each(sub { | |
my $a = shift; | |
$a->attr('href' => $base . $a->attr('href')); | |
}); | |
return $body->inner_xml; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment