]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/links.php
Wordpress 2.0.11
[autoinstalls/wordpress.git] / wp-includes / links.php
index 6010a26f654fed80777a9a849b51e6a752beaddd..d907933f7d84429e2a288698d2792689d33bd24c 100644 (file)
@@ -212,15 +212,15 @@ function get_links($category = -1,
 
                $the_link = '#';
                if (!empty($row->link_url))
-                       $the_link = wp_specialchars($row->link_url);
+                       $the_link = clean_url($row->link_url);
 
                $rel = $row->link_rel;
                if ($rel != '') {
                        $rel = ' rel="' . $rel . '"';
                }
 
-               $desc = wp_specialchars($row->link_description, ENT_QUOTES);
-               $name = wp_specialchars($row->link_name, ENT_QUOTES);
+               $desc = attribute_escape($row->link_description);
+               $name = attribute_escape($row->link_name);
                $title = $desc;
 
                if ($show_updated) {
@@ -445,9 +445,10 @@ function get_links_withrating($category = -1, $before = '', $after = '<br />',
  **                uses 0
  */
 function get_linkcatname($id = 0) {
+    $id = (int) $id;
     global $wpdb;
     $cat_name = '';
-    if ('' != $id) {
+    if ( !empty($id) ) {
         $cat_name = $wpdb->get_var("SELECT cat_name FROM $wpdb->linkcategories WHERE cat_id=$id");
     }
     return $cat_name;
@@ -562,4 +563,4 @@ function get_links_list($order = 'name', $hide_if_empty = 'obsolete') {
        }
 }
 
-?>
\ No newline at end of file
+?>