Changeset 7834


Ignore:
Timestamp:
09/10/09 22:03:14 (2 years ago)
Author:
azawawi
Message:

[Padre] Applied cowens++ patch that fixes ticket:549 and fixes
[Padre] a bug with Pod::Simple::XHTML where <, <<=, and > are not
[Padre] escaped into their corresponding HTML entities.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Padre/lib/Padre/Pod2HTML.pm

    r7689 r7834  
    4848    $self->parse_string_document($input); 
    4949 
     50    #FIXME: this takes care of a bug in Pod::Simple::XHTML 
     51    $self->{html} =~ s/<</&lt&lt;/g; 
     52    $self->{html} =~ s/< /&lt /g; 
     53    $self->{html} =~ s/<=/&lt=/g; 
     54 
     55    #FIXME: this is incredibly bad, but the anchors are predictible 
     56    $self->{html} =~ s#<a href=".*?">|</a>##g; 
     57 
    5058    return $self->{html}; 
    5159} 
     
    5765sub new { 
    5866    my $class = shift; 
    59     my $self = $class->SUPER::new( output_fh => 1, @_ ); 
     67    my $self = $class->SUPER::new(@_); 
    6068 
    6169    # Ignore POD irregularities 
    6270    $self->no_whining(1); 
    6371    $self->no_errata_section(1); 
     72    $self->output_string(\$self->{html}); 
    6473 
    6574    return $self; 
    66 } 
    67  
    68 # Override emit to build html from scratch :) 
    69 sub emit { 
    70     my $self = shift; 
    71     $self->{html} .= $self->{scratch}; 
    7275} 
    7376 
Note: See TracChangeset for help on using the changeset viewer.