Skip to content

Commit

Permalink
escape # for usage in urls
Browse files Browse the repository at this point in the history
  • Loading branch information
arcanez committed May 27, 2009
1 parent 35842bc commit e32e11f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Angerwhale/Format/HTML.pm
Expand Up @@ -213,8 +213,7 @@ sub _parse {
$scheme = 'http'; $scheme = 'http';
} }


if ( $scheme !~ /^(http|ftp|mailto)$/ if ( $scheme !~ /^(http|ftp|mailto)$/ )
|| $uri->as_string =~ /#/ )
{ {
$result .= $self->_parse(@kids); # not a link. $result .= $self->_parse(@kids); # not a link.
} }
Expand Down Expand Up @@ -342,6 +341,7 @@ sub _escape {
$text =~ s/>/>/g; $text =~ s/>/>/g;
$text =~ s/"/"/g; $text =~ s/"/"/g;
$text =~ s/'/'/g; $text =~ s/'/'/g;
$text =~ s/#/#/g;
return $text; return $text;
} }


Expand Down

0 comments on commit e32e11f

Please sign in to comment.