Make WordPress Core

Changeset 8525


Ignore:
Timestamp:
08/02/2008 05:32:25 PM (16 years ago)
Author:
ryan
Message:

Allow IRIs. Props guillep2k. fixes #4570

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/formatting.php

    r8298 r8525  
    683683    $ret = ' ' . $ret;
    684684    // in testing, using arrays here was found to be faster
    685     $ret = preg_replace_callback('#([\s>])([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*)#is', '_make_url_clickable_cb', $ret);
    686     $ret = preg_replace_callback('#([\s>])((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*)#is', '_make_web_ftp_clickable_cb', $ret);
     685    $ret = preg_replace_callback('#([\s>])([\w]+?://[\w\\x80-\\xff\#$%&~/.\-;:=,?@\[\]+]*)#is', '_make_url_clickable_cb', $ret);
     686    $ret = preg_replace_callback('#([\s>])((www|ftp)\.[\w\\x80-\\xff\#$%&~/.\-;:=,?@\[\]+]*)#is', '_make_web_ftp_clickable_cb', $ret);
    687687    $ret = preg_replace_callback('#([\s>])([.0-9a-z_+-]+)@(([0-9a-z-]+\.)+[0-9a-z]{2,})#i', '_make_email_clickable_cb', $ret);
    688688    // this one is not in an array because we need it to run last, for cleanup of accidental links within links
     
    11481148
    11491149    if ('' == $url) return $url;
    1150     $url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%@()]|i', '', $url);
     1150    $url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%@()\\x80-\\xff]|i', '', $url);
    11511151    $strip = array('%0d', '%0a');
    11521152    $url = str_replace($strip, '', $url);
Note: See TracChangeset for help on using the changeset viewer.