Changeset 32325
- Timestamp:
- 2018-08-06T20:04:55+12:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugins/HTMLPlugin.pm
r32096 r32325 230 230 # some links may just be anchor names 231 231 next unless ($raw_link =~ /\S+/); 232 232 # don't block embedded images, which start with src="data:image..." 233 next if($raw_link =~ m@data\:image@); 234 233 235 if ($raw_link !~ m@^/@ && $raw_link !~ m/^([A-Z]:?)\\/i) { 234 236 # Turn relative file path into full path … … 796 798 $file, $doc_obj, $section) = @_; 797 799 800 # don't modify embedded images. These start with data:image and are base-64 encoded. Return them as is 801 # If we let this method proceed, it will not just mark embedded images as "external links", but will wrongly 802 # clean up double slashes in the base-64 encoded part as single slash, which clobbers the encoding/image. 803 return ($front . $link .$back) if($link =~ m@^[\"\']?data\:image@); 804 805 798 806 # remove quotes from link at start and end if necessary 799 807 if ($link=~/^[\"\']/) {
Note:
See TracChangeset
for help on using the changeset viewer.