Changeset 16888


Ignore:
Timestamp:
2008-08-19T12:48:58+12:00 (16 years ago)
Author:
ak19
Message:

URL encodes the name of the file(s) generated upon conversion to html, incl assoc image files. This is in order for ReplaceSrcDocWithHtml to be able to allow users to edit an html file with images since an html file with a utf8 filename referring to imgs with utf8 filenames don't work properly when viewed statically on Firefox or IE a Windows machine

File:
1 edited

Legend:

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

    r16580 r16888  
    276276    #$tailname =~ s/\-+//g;
    277277
    278     # convert to utf-8 otherwise we have problems with the doc.xml file
    279     # later on
    280     print STDERR "**** filename $tailname$suffix is already UTF8\n" if &unicode::check_is_utf8($tailname);
     278    # convert to utf-8 otherwise we have problems with the doc.xml file later on
     279#    print STDERR "**** filename $tailname$suffix is already UTF8\n" if &unicode::check_is_utf8($tailname);
    281280    $tailname = $self->SUPER::filepath_to_utf8($tailname) unless &unicode::check_is_utf8($tailname);
     281
     282    # URLEncode this since htmls with images where the html filename is utf8 don't seem
     283    # to work on Windows (IE or Firefox), as browsers are looking for filesystem-encoded
     284    # files on the filesystem.
     285    $tailname = &unicode::url_encode($tailname);
    282286
    283287    $suffix = lc($suffix);
Note: See TracChangeset for help on using the changeset viewer.