Changeset 23835
- Timestamp:
- 2011-03-29T20:19:34+13:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugins/HTMLPlugin.pm
r23760 r23835 447 447 # my $utf8_file = $self->filename_to_utf8_metadata($file); 448 448 # $utf8_file =~ s/&\#095;/_/g; 449 # variable below used to be utf8_file 449 # variable below used to be utf8_file 450 450 451 my $url_encoded_file = &unicode::raw_filename_to_url_encoded($tailname); 451 452 my $utf8_url_encoded_file = &unicode::raw_filename_to_utf8_url_encoded($tailname); … … 796 797 my $self = shift (@_); 797 798 my ($front, $link, $back, $base_dir, $file, $doc_obj, $section) = @_; 798 799 799 800 # remove quotes from link at start and end if necessary 800 801 if ($link=~/^[\"\']/) { … … 821 822 # is taken in to account 822 823 my ($href, $hash_part, $rl) = $self->format_link ($link, $base_dir, $file); 823 824 824 825 # href may use '\'s where '/'s should be on Windows 825 826 $href =~ s/\\/\//g; … … 853 854 # If web page didn't give encoding, then default to utf8 854 855 my $content_encoding= $self->{'content_encoding'} || "utf8"; 855 856 856 857 if ((defined $ENV{"DEBUG_UNICODE"}) && ($ENV{"DEBUG_UNICODE"})) { 857 858 print STDERR "**** Encoding with '$content_encoding', href: $href\n"; 858 859 } 859 860 861 # on Darwin, the unicode filenames are stored on the file 862 # system in decomposed form, so any href link (including when 863 # URL-encoded) should refer to the decomposed name of the file 864 if ($ENV{'GSDLOS'} =~ /^darwin$/i) { 865 $href = normalize('D', $href); # Normalization Form D (decomposition) 866 } 867 860 868 $href = encode($content_encoding,$href); 861 869 } 862 870 863 $href = &unicode::raw_filename_to_utf8_url_encoded($href); 871 $href = &unicode::raw_filename_to_utf8_url_encoded($href); 864 872 $href = &unicode::filename_to_url($href); 865 873
Note:
See TracChangeset
for help on using the changeset viewer.