Ticket #549: cowens.patch

File cowens.patch, 1.1 KB (added by azawawi, 5 years ago)

cowens++ Patch to fix <, < and << along

  • Pod2HTML.pm

    old new  
    4747    $self->{html} = ''; 
    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} 
    5260 
     
    5664# Prevent binding to STDOUT 
    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; 
    6675} 
    6776 
    68 # Override emit to build html from scratch :) 
    69 sub emit { 
    70     my $self = shift; 
    71     $self->{html} .= $self->{scratch}; 
    72 } 
    73  
    7477##################################################################### 
    7578# Customize HTML generation 
    7679