Skip to content

Commit

Permalink
abondoned HTML::Entities as a fallback for Text::VimColor because it …
Browse files Browse the repository at this point in the history
…gives

weird "Bad file descriptor" errors


git-svn-id: svn+ssh://faui2k3.org/var/lib/svn/moritz/mowyw@270 addfbb1e-f4f9-0310-b6f0-bccd0f9b8dc6
  • Loading branch information
moritz committed Mar 31, 2007
1 parent 0fad865 commit c823585
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions mowyw
Expand Up @@ -468,19 +468,10 @@ sub p_syntax {
if ($@){
# require was not successfull
print STDERR " Not syntax hilighting, Text::VimColor not found\n";
# try to escape special chars with HTML::Entities
eval {
no warnings "all";
require HTML::Entities;
};
if ($@){
# even that failed.
$str =~ s#&#&#g;
$str =~ s#<#&lt;#g;
$str =~ s#>#&gt;#g;
} else {
$str = encode_entities($str);
}
# encode at least some special chars "by hand"
$str =~ s#&#&amp;#g;
$str =~ s#<#&lt;#g;
$str =~ s#>#&gt;#g;
return $str;
} else {
my $syn = Text::VimColor->new(
Expand Down

0 comments on commit c823585

Please sign in to comment.