Changeset 2940

Show
Ignore:
Timestamp:
08/19/08 01:13:29 (3 months ago)
Author:
bchoate
Message:

Applied patch regex to strip leading whitespace ahead of DOCTYPE and xml pragma. BugId:80996 (thanks, Jay)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/MT/App.pm

    r2895 r2940  
    26322632            } 
    26332633 
    2634             # Some browsers throw you to quirks mode if the doctype isn't 
    2635             # up front. 
    2636             $body =~ s/^\s+(<!DOCTYPE)/$1/s if defined $body; 
    2637  
    26382634            unless ( defined $body 
    26392635                || $app->{redirect} 
     
    27272723                } 
    27282724            } 
     2725 
     2726            # Some browsers throw you to quirks mode if the doctype isn't 
     2727            # up front and leading whitespace makes a feed invalid. 
     2728            $body =~ s/\A\s+(<(?:\?xml|!DOCTYPE))/$1/s if defined $body; 
     2729 
    27292730            $app->print($body); 
    27302731        } 
  • trunk/lib/MT/WeblogPublisher.pm

    r2737 r2940  
    12971297          ); 
    12981298        } 
     1299 
     1300        # Some browsers throw you to quirks mode if the doctype isn't 
     1301        # up front and leading whitespace makes a feed invalid. 
     1302        $html =~ s/\A\s+(<(?:\?xml|!DOCTYPE))/$1/s; 
     1303 
    12991304        my $orig_html = $html; 
    13001305        MT->run_callbacks( 
     
    15681573        } 
    15691574 
     1575        # Some browsers throw you to quirks mode if the doctype isn't 
     1576        # up front and leading whitespace makes a feed invalid. 
     1577        $html =~ s/\A\s+(<(?:\?xml|!DOCTYPE))/$1/s; 
     1578 
    15701579        my $orig_html = $html; 
    15711580        MT->run_callbacks(