WordPress.org

Make WordPress Core

Ticket #890: relative_enclosures.diff

File relative_enclosures.diff, 652 bytes (added by markjaquith, 14 years ago)
  • wp-includes/functions.php

     
    10251025        $punc = '.:?\-';
    10261026        $any = $ltrs . $gunk . $punc;
    10271027
     1028        // allow for relative (to the site) enclosures
     1029        $content = str_replace(' href="/', ' href="http://' . $_SERVER['HTTP_HOST'] . '/', $content);
     1030        $content = str_replace(" href='/", " href='http://" . $_SERVER['HTTP_HOST'] . '/', $content);
     1031
    10281032        preg_match_all("{\b http : [$any] +? (?= [$punc] * [^$any] | $)}x", $content, $post_links_temp);
    10291033
    10301034        debug_fwrite($log, 'Post contents:');