Changeset 15018 for gsdl/trunk/perllib/plugins/PagedImgPlug.pm
- Timestamp:
- 2008-02-27T17:07:17+13:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/plugins/PagedImgPlug.pm
r14661 r15018 71 71 #<PagedDocument> 72 72 #<Metadata name="Title">The Title of the entire document</Metadata> 73 #<Page pagenum="1" imgfile="xxx.jpg" txtfile="yyy. jpg">73 #<Page pagenum="1" imgfile="xxx.jpg" txtfile="yyy.txt"> 74 74 #<Metadata name="Title">The Title of this page</Metadata> 75 75 #</Page> … … 257 257 my $self = shift (@_); 258 258 259 return q^(?i)(\.jpe?g|\.gif|\.png|\.tif?f|\.te?xt| ~)$^259 return q^(?i)(\.jpe?g|\.gif|\.png|\.tif?f|\.te?xt|\.html?|~)$^ 260 260 } 261 261 … … 937 937 $text =~ s/\\/\\\\/g; # macro language 938 938 $text =~ s/_/\\_/g; # macro language 939 $text =~ s/</</g; 940 $text =~ s/>/>/g; 941 942 # insert preformat tags and add text to document object 943 $doc_obj->add_utf8_text($cursection, "<pre>\n$text\n</pre>"); 939 940 941 if ($text =~ m/<html.*?>\s*<head.*?>.*<\/head>\s*<body.*?>(.*)<\/body>\s*<\/html>\s*$/s) { 942 # looks like HTML input 943 # no need to escape < and > or put in <pre> tags 944 945 $text = $1; 946 947 # insert preformat tags and add text to document object 948 $doc_obj->add_utf8_text($cursection, "$text"); 949 } 950 else { 951 $text =~ s/</</g; 952 $text =~ s/>/>/g; 953 954 # insert preformat tags and add text to document object 955 $doc_obj->add_utf8_text($cursection, "<pre>\n$text\n</pre>"); 956 } 957 944 958 945 959 return 1;
Note:
See TracChangeset
for help on using the changeset viewer.