--- search/filters/default.pl 2002/06/16 19:39:45 1.4 +++ search/filters/default.pl 2002/10/24 18:25:22 1.5 @@ -150,54 +150,16 @@ return $tmp; } - $Document{$FieldTag} = html_enc($Document{$FieldTag}); - - # Print the field data, marking up if needed - if ( $FieldTag eq "A" || $FieldTag eq "E" ) { - $CommaFlag = 0; - @Authors = split(/;/, $Document{$FieldTag}); - foreach $Author ( @Authors ) { - if ( $CommaFlag ) { - $DocumentFinal .= ", "; - } - $CommaFlag = 1; - $SearchTerm = $Author; - $SearchTerm =~ s/,//g; - @AuthorNames = split(/ /, $SearchTerm); - $SearchTerm = ""; - foreach $AuthorName ( @AuthorNames ) { - if ( ! ($AuthorName =~ /^\w+\.$/) ) { - if ( $AuthorName ne "" ) { - $AuthorName .= " "; - } - $SearchTerm .= $AuthorName; - } - } - $SearchTerm =~ s/ /+/g; - $DocumentFinal .= " $Author "; - } - } - elsif ( $FieldTag eq "K" ) { - $CommaFlag = 0; - @Keywords = split(/,/, $Document{$FieldTag}); - foreach $Keyword ( @Keywords ) { - if ( $CommaFlag ) { - $DocumentFinal .= ", "; - } - $CommaFlag = 1; - $SearchTerm = $Keyword; - $SearchTerm =~ s/ /+/g; - $DocumentFinal .= " $Keyword "; + # format URI + if ( $FieldTag eq "856" ) { + my $alt = $Document{$FieldTag}; + if (length $alt > $default::max_display_url_len ) { + $alt = substr($alt,0,$default::max_display_url_len)."..."; } - } - elsif ( $FieldTag eq "W" ) { - $DocumentFinal .= " $Document{$FieldTag} "; - } - elsif ( $FieldTag eq "Y" ) { - $DocumentFinal .= "
$Document{$FieldTag}
"; - } - else { - $DocumentFinal .= "$Document{$FieldTag}"; + $DocumentFinal .= "$alt"; + + } else { + $DocumentFinal .= html_enc($Document{$FieldTag}); } $DocumentFinal .= " \n";