Permalink
Browse files

escape # for usage in urls

  • Loading branch information...
1 parent 35842bc commit e32e11fce0f4a8e150ca528a49a23dfdded67995 @arcanez committed May 27, 2009
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/Angerwhale/Format/HTML.pm
@@ -213,8 +213,7 @@ sub _parse {
$scheme = 'http';
}
- if ( $scheme !~ /^(http|ftp|mailto)$/
- || $uri->as_string =~ /#/ )
+ if ( $scheme !~ /^(http|ftp|mailto)$/ )
{
$result .= $self->_parse(@kids); # not a link.
}
@@ -342,6 +341,7 @@ sub _escape {
$text =~ s/>/>/g;
$text =~ s/"/"/g;
$text =~ s/'/'/g;
+ $text =~ s/#/#/g;
return $text;
}

0 comments on commit e32e11f

Please sign in to comment.