Menu

#16 Function ereg_replace() is deprecated

None
closed
None
2014-06-07
2014-05-29
Alexander
No

I replaced ereg_replace with preg_replace function call in utils.php 21 line.

$attrib_value = preg_replace(
                "/[[:alpha:]]+:\/\/[^<>[:space:]]+[[:alnum:]\/]/",
                "<a href=\"\\0\" rel=\"nofollow\">\\0</a>",$attrib_value);

Discussion

  • James Turner

    James Turner - 2014-06-02
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,5 +1,7 @@
     I replaced ereg_replace with preg_replace function call in utils.php  21 line.
    
    +~~~~~~
     $attrib_value = preg_replace(
                     "/[[:alpha:]]+:\/\/[^<>[:space:]]+[[:alnum:]\/]/",
                     "<a href=\"\\0\" rel=\"nofollow\">\\0</a>",$attrib_value);
    +~~~~~~
    
    • Milestone: -->
     
  • James Turner

    James Turner - 2014-06-02
    • status: open --> accepted
    • assigned_to: James Turner
     
  • James Turner

    James Turner - 2014-06-02

    Agreed; to be incorporated into next version.

    (Fixed ticket system wiki mangling of replacement code fragment)

     
  • James Turner

    James Turner - 2014-06-06

    Committed for inclusion in next version.

     
  • James Turner

    James Turner - 2014-06-06
    • status: accepted --> pending
     
  • James Turner

    James Turner - 2014-06-07

    Fixed in version 0.12.

    (The code in question has been split into a separate function, urls_to_links(), in preparation for adding editing support in a future version.)

     
  • James Turner

    James Turner - 2014-06-07
    • status: pending --> closed
     

Log in to post a comment.