Make WordPress Core

Changeset 16692


Ignore:
Timestamp:
12/02/2010 05:26:06 PM (14 years ago)
Author:
westi
Message:

Revert [16279] - the recursive nature of this regex doesn't play well with stack space. See #14993

File:
1 edited

Legend:

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

    r16469 r16692  
    13801380    $ret = ' ' . $ret;
    13811381    // in testing, using arrays here was found to be faster
    1382     $ret = preg_replace_callback('#(?<!=[\'"])(?<=[*\')+.,;:!=&$\s>])(\()?([\w]+?://(?:[\w\\x80-\\xff\#%~/?@\[\]-]|[\'*(+.,;:!=&$](?![\s<\b]|(\))?([\s]|$))|(?(1)\)(?![\s<.,;:]|$)|\)))+)#is', '_make_url_clickable_cb', $ret);
     1382    $ret = preg_replace_callback('#(?<=[\s>])(\()?([\w]+?://(?:[\w\\x80-\\xff\#$%&~/=?@\[\](!+-]|[.,;:](?![\s<]|(\))?([\s]|$))|(?(1)\)(?![\s<.,;:]|$)|\)))+)#is', '_make_url_clickable_cb', $ret);
    13831383    $ret = preg_replace_callback('#([\s>])((www|ftp)\.[\w\\x80-\\xff\#$%&~/.\-;:=,?@\[\]+]+)#is', '_make_web_ftp_clickable_cb', $ret);
    13841384    $ret = preg_replace_callback('#([\s>])([.0-9a-z_+-]+)@(([0-9a-z-]+\.)+[0-9a-z]{2,})#i', '_make_email_clickable_cb', $ret);
Note: See TracChangeset for help on using the changeset viewer.