([^<>]*)
([^<>]*)
Autor:\s+(.*?)(?:, iDNES.cz)?
X-Git-Url: https://git.jankratochvil.net/?p=nethome.git;a=blobdiff_plain;f=public_html%2Fcgi-bin%2Fidnes-foto;h=2cd8e7325d1828b9d1b25fa9dfb0647bfd026ef4;hp=dfdbd9649833afc73a3787675631b56b273568ba;hb=89ca70a15a92676350073237f862e90b567430d5;hpb=c8f94771b5de8eba10e174a63a8d5c778dff065e diff --git a/public_html/cgi-bin/idnes-foto b/public_html/cgi-bin/idnes-foto index dfdbd96..2cd8e73 100755 --- a/public_html/cgi-bin/idnes-foto +++ b/public_html/cgi-bin/idnes-foto @@ -18,11 +18,13 @@ else { $BASE=$ARGV[0]; } +# Somehow Perl modules started reencoding windows-1250 -> utf-8. + if ($ENV{"GATEWAY_INTERFACE"}) { my $future=HTTP::Date::time2str(2000000000); my $past =HTTP::Date::time2str(1000000000); print <<"EOH"; -Content-type: text/html; charset=windows-1250 +Content-type: text/html; charset=utf-8 Cache-Control: public Expires: $future Last-Modified: $past @@ -32,14 +34,14 @@ EOH print <<"EOH";
([^<>]*)
}, $info=~m{}s, ) { next if !$text; + $text=~s/^\s+//s; + $text=~s/\s+$//s; + next if !$text; + $hit++; print <<"EOH" if !$seen_p_text{$text}++;$text
EOH } - warn "No text found: $infourl" if $text_last==keys(%seen_p_text); + warn "No text found: $infourl" if !$hit; } die $pageurl if !$did; $pageno++;