WordPress.org

Make WordPress Core

Changeset 5070


Ignore:
Timestamp:
03/21/07 04:28:53 (7 years ago)
Author:
ryan
Message:

Use clean_url instead of inline preg. Props rob1n. fixes #3983 for 2.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0/wp-admin/admin-functions.php

    r5058 r5070  
    503503 
    504504    $_POST['link_url'] = wp_specialchars($_POST['link_url']); 
    505     $_POST['link_url'] = preg_match('/^(https?|ftps?|mailto|news|gopher):/is', $_POST['link_url']) ? $_POST['link_url'] : 'http://' . $_POST['link_url']; 
     505    $_POST['link_url'] = clean_url($_POST['link_url']); 
    506506    $_POST['link_name'] = wp_specialchars($_POST['link_name']); 
    507507    $_POST['link_image'] = wp_specialchars($_POST['link_image']); 
    508     $_POST['link_rss'] = wp_specialchars($_POST['link_rss']); 
     508    $_POST['link_rss'] = clean_url($_POST['link_rss']); 
    509509    $auto_toggle = get_autotoggle($_POST['link_category']); 
    510510     
Note: See TracChangeset for help on using the changeset viewer.