--- trunk/WebPac.pm 2003/07/05 23:07:47 76 +++ trunk/WebPac.pm 2003/07/15 12:48:49 111 @@ -117,6 +117,13 @@ my $tmpl = $self->load_tmpl('results.html'); + sub esc_html { + my $html = shift; + $html =~ s//>/g; + return $html; + } + # call swish my $sh = SWISH->connect('Fork', prog => $SWISH, @@ -128,7 +135,7 @@ push @swish_results, { nr => ($#swish_results + 2), path => $hit->swishdocpath, - headline => $from_utf8->convert($hit->headline), + headline => esc_html($from_utf8->convert($hit->headline)), html => back2html($from_utf8->convert($hit->html)), rank => $hit->swishrank }; @@ -140,7 +147,7 @@ die $SWISH::errstr unless $sh; # construct swish query my $sw_q = join(" and ",@s_arr); - if (@path_arr) { + if (@path_arr && $q->param('show_full')) { $sw_q .= "and (swishdocpath=\""; $sw_q .= join("\" or swishdocpath=\"",@path_arr); $sw_q .= "\")";