--- /usr/share/webapps/wordpress/1.2.2/htdocs/wp-links-opml.php	2004-12-26 16:20:45.000000000 -0500
+++ wp-links-opml.php	2005-01-02 19:20:36.000000000 -0500
@@ -4,6 +4,9 @@
 header('Content-type: text/xml', true);
 require('wp-blog-header.php');
 
+$needesc = array("&", "<", ">", "\'", "\"");
+$theesc = array("&amp;", "&lt;", "&gt;", "&apos;", "&quot;");
+
 $link_cat = $_GET['link_cat'];
 if ((empty($link_cat)) || ($link_cat == 'all') || ($link_cat == '0')) {
     $sql_cat = '';
@@ -49,7 +52,7 @@
              $prev_cat_id = $result->link_category;
         } // end if new category
 ?>
-            <outline title="<?php echo(htmlspecialchars(stripslashes($result->link_name))) ?>" type="link" xmlUrl="<?php echo $result->link_rss; ?>" htmlUrl="<?php echo($result->link_url) ?>"/>
+            <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) ?>"/>
 <?php
         } // end foreach
     } // end if
