Changeset 18521

Show
Ignore:
Timestamp:
16.02.2009 11:52:50 (11 years ago)
Author:
davidb
Message:

& in URLs encoded at &. The former used to work in most browsers, however having it escaped is considered better from (and consisent with what the standard expects). Fix thanks to DL Consulting.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/perllib/plugins/HTMLPlugin.pm

    r18409 r18521  
    10691069    ($href =~ m/\/$/) || ($href =~ m/^(mailto|news|gopher|nntp|telnet|javascript):/i)) { 
    10701070    &ghtml::urlsafe ($href); 
    1071     return $front . "_httpextlink_&rl=" . $rl . "&href=" . $href . $hash_part . $back; 
     1071    return $front . "_httpextlink_&rl=" . $rl . "&href=" . $href . $hash_part . $back; 
    10721072    } else { 
    10731073    # link is to some other type of file (eg image) so we'll 
     
    11121112    if ($rl == 0) { 
    11131113    if ((!defined $ext) || ($ext !~ m/$self->{'assoc_files'}/)) { 
    1114         return "_httpextlink_&rl=0&el=prompt&href=" . $href . $hash_part; 
     1114        return "_httpextlink_&rl=0&el=prompt&href=" . $href . $hash_part; 
    11151115    } 
    11161116    else { 
    1117         return "_httpextlink_&rl=0&el=direct&href=" . $href . $hash_part; 
     1117        return "_httpextlink_&rl=0&el=direct&href=" . $href . $hash_part; 
    11181118    } 
    11191119    } 
    11201120 
    11211121    if ((!defined $ext) || ($ext !~ m/$self->{'assoc_files'}/)) { 
    1122     return "_httpextlink_&rl=" . $rl . "&href=" . $href . $hash_part; 
     1122    return "_httpextlink_&rl=" . $rl . "&href=" . $href . $hash_part; 
    11231123    } 
    11241124    if ($self->{'rename_assoc_files'}) { 
     
    13801380        $found_title = 1; 
    13811381    } 
    1382     print $outhandle " extracted \"$tag\" metadata \"$value\"\n"  
    1383         if ($self->{'verbosity'} > 2); 
    1384     if ($tag =~ m/date.*/i){ 
    1385         $tag = lc($tag); 
    1386     } 
     1382 
     1383    if ($self->{'verbosity'} > 2) { 
     1384        print $outhandle " extracted \"$tag\" metadata \"$value\"\n"; 
     1385    } 
     1386 
     1387    # Do we still reply on the following?  Surely there must  
     1388    # be a better way to go about this outside of the plugin? 
     1389    #  
     1390    #if ($tag =~ m/date.*/i){ 
     1391    #    $tag = lc($tag); 
     1392    #} 
     1393 
    13871394    $doc_obj->add_utf8_metadata($section, $tag, $value); 
    13881395