my $thash = shift;
my $rethtmlstr = "";
use open ":encoding(utf8)"; # needed to have utf8 survive through the shell pipe
- my $cmd_markdownify = $GIT . " " . git_cmd() . " cat-file blob " . $thash . " | " . $PERL . " -e 'my \$str = do { local \$/; <STDIN> }; \$str =~ s/<!--.*?--\s*>//gs; print \$str;' | " . $MD . " |";
+ my $cmd_markdownify = $GIT . " " . git_cmd() . " cat-file blob " . $thash . " | " . $PERL . " -e 'my \$str = do { local \$/; <STDIN> }; \$str =~ s/<!--.*?--\\s*>//gs; print \$str;' | " . $MD . " |";
open (FOO, $cmd_markdownify) or die_error(500, "Open git-cat-file blob '$thash' failed");
while (<FOO>) {
if ($_ =~ /(<img[^>]src=")(.*?)"/) {
}
}
}
- if ($_ =~ /(<a[^>]href=")(.*?)"/) {
+ if ($_ =~ /(<a[^>]href="[^\/])(.*?)"/) {
my $origcut = "".$2;
my $testcut = "".$2;
my $is_anchor = ($testcut =~ /^#/);