Ignore:
Timestamp:
08/17/08 14:48:04 (4 years ago)
Author:
hverton
Message:

fixed incorrectly parsing [img] tags

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/forum_functions_include.php

    r1598 r1647  
    447447    $rawmsg = preg_replace_callback('#\[url(=.*?)\](.*?)([\r\n]*)\[/url\]#si', '_parseubb_urlblock', $rawmsg); 
    448448 
     449    // strip IMG bbcode 
     450    $rawmsg = preg_replace_callback('#\[img\](.*?)([\r\n]*)\[/img\]#si', '_parseubb_imgblock', $rawmsg); 
     451 
    449452    // find other URL's in the text, strip them and add them to $urlblocks for conversion to [URL] bbcodes 
    450453    $rawmsg = preg_replace_callback('#(http|https|ftp)\://([a-zA-Z0-9\.\-]+(\:[a-zA-Z0-9\.&%\$\-]+)*@)?((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])|(localhost)|([a-zA-Z0-9\-]+\.)*[a-zA-Z0-9\-]+\.[a-zA-Z]{2,4})(\:[0-9]+)?(/[^/][a-zA-Z0-9\.\,\?\'\\/\+&%\$\#\:\*\=~_\-@]*)*#si', '_parseubb_texturls', $rawmsg); 
     
    452455    // convert any newlines to html <br> 
    453456    $rawmsg = nl2br($rawmsg); 
    454  
    455     // strip IMG bbcode 
    456     $rawmsg = preg_replace_callback('#\[img\](.*?)([\r\n]*)\[/img\]#si', '_parseubb_imgblock', $rawmsg); 
    457457 
    458458    // detect and convert wikitags to wiki bbcodes if needed 
Note: See TracChangeset for help on using the changeset viewer.