Changeset 22594 for main/trunk/greenstone2/perllib/plugins/HTMLPlugin.pm
- Timestamp:
- 2010-08-10T11:51:17+12:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugins/HTMLPlugin.pm
r22355 r22594 1576 1576 close (PROD) || die("Error Closing File: $tmp_filename $!"); 1577 1577 1578 1579 my ($language, $encoding) = $self->textcat_get_language_encoding ($input_filename); 1580 #print STDERR "*** encoding = $encoding\n"; 1581 1578 1582 # run html-tidy on the tmp file to make it a proper XML file 1579 my $tidyfile = `tidy -utf8 -wrap 0 -asxml "$tmp_filename"`; 1583 1584 my $outhandle = $self->{'outhandle'}; 1585 print $outhandle "Converting HTML to be XML compliant:\n"; 1586 1587 my $tidy_cmd = "tidy"; 1588 $tidy_cmd .= " -q" if ($self->{'verbosity'} <= 2); 1589 $tidy_cmd .= " -utf8 -wrap 0 -asxml \"$tmp_filename\""; 1590 if ($self->{'verbosity'} <= 2) { 1591 if ($ENV{'GSDLOS'} =~ m/^windows/i) { 1592 $tidy_cmd .= " 2>nul"; 1593 } 1594 else { 1595 $tidy_cmd .= " 2>/dev/null"; 1596 } 1597 print $outhandle " => $tidy_cmd\n"; 1598 } 1599 1600 my $tidyfile = `$tidy_cmd`; 1580 1601 1581 1602 # write result back to the tmp file
Note:
See TracChangeset
for help on using the changeset viewer.