1 |
#!/usr/bin/perl |
#!/usr/bin/perl |
2 |
# -*- Mode: Perl -*- |
# -*- Mode: Perl -*- |
3 |
# $Basename: HTML.pm $ |
# $Basename: HTML.pm $ |
4 |
# $Revision: 1.8 $ |
# $Revision: 1.9 $ |
5 |
# Author : Ulrich Pfeifer with Andreas König |
# Author : Ulrich Pfeifer with Andreas König |
6 |
# Created On : Sat Nov 1 1997 |
# Created On : Sat Nov 1 1997 |
7 |
# Last Modified By: Ulrich Pfeifer |
# Last Modified By: Ulrich Pfeifer |
71 |
return unless $tag eq "div"; |
return unless $tag eq "div"; |
72 |
print "<" x $open, $tag, "\n" if $debug; |
print "<" x $open, $tag, "\n" if $debug; |
73 |
$open--; |
$open--; |
74 |
|
return unless $div; |
75 |
$text =~ s/^\s+//; |
$text =~ s/^\s+//; |
76 |
$text =~ s/\s+$//; |
$text =~ s/\s+$//; |
77 |
$text =~ s/\s+/ /g; |
$text =~ s/\s+/ /g; |
78 |
$result{$div} .= $text . ' '; |
if (defined $result{$div}){ |
79 |
|
$result{$div} .= " $text"; |
80 |
|
} else { |
81 |
|
$result{$div} = $text; |
82 |
|
} |
83 |
$text = ''; |
$text = ''; |
84 |
} |
} |
85 |
|
|
145 |
} |
} |
146 |
if ($doc->{inx}) { |
if ($doc->{inx}) { |
147 |
my_parse($doc->{inx}); |
my_parse($doc->{inx}); |
148 |
my $s = $result{book_inx}; |
my $s = $result{book_inx} || ""; |
149 |
$s =~ s/<BR>/ /ig; |
$s =~ s/<BR>/ /ig; |
150 |
$s =~ s/&#(8211);/-/g; |
$s =~ s/&#(8211);/-/g; |
151 |
$s =~ s/&#(8220);/"/g; |
$s =~ s/&#(8220);/"/g; |