WordPress.org

Make WordPress Core

Ticket #624: wp-links-opml.patch

File wp-links-opml.patch, 1.0 KB (added by anonymousbugger, 10 years ago)
  • wp-links-opml.php

    old new  
    44header('Content-type: text/xml', true); 
    55require('wp-blog-header.php'); 
    66 
     7$needesc = array("&", "<", ">", "\'", "\""); 
     8$theesc = array("&amp;", "&lt;", "&gt;", "&apos;", "&quot;"); 
     9 
    710$link_cat = $_GET['link_cat']; 
    811if ((empty($link_cat)) || ($link_cat == 'all') || ($link_cat == '0')) { 
    912    $sql_cat = ''; 
     
    4952             $prev_cat_id = $result->link_category; 
    5053        } // end if new category 
    5154?> 
    52             <outline title="<?php echo(htmlspecialchars(stripslashes($result->link_name))) ?>" type="link" xmlUrl="<?php echo $result->link_rss; ?>" htmlUrl="<?php echo($result->link_url) ?>"/> 
     55            <outline title="<?php echo(htmlspecialchars(stripslashes($result->link_name))) ?>" type="link" xmlUrl="<?php echo $result->link_rss; ?>" htmlUrl="<?php echo str_replace($needesc,$theesc,$result->link_url) ?>"/> 
    5356<?php 
    5457        } // end foreach 
    5558    } // end if