Not signed in (Sign In)

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorRainTheBat
    • CommentTimeSep 9th 2008 edited
     
    Hi, note: (space added in front of break tags so they would show up in this post i.e. < br />)

    I am trying to strip out the < br /> tags which are showing up in with just the 'br' in the url, all the other parts get stripped during the preg_replace() operation. The problem is my way of doing this does not work correctly, although it strips out the < br> and < br /> correctly, now when I click on the thumbnail, the link no longer works properly:

    This is what I have for sanitize_filename

    function sanitize_filename($str) {
    $str = str_replace("< br>", "",$str);
    $str = str_replace("< br />", "_", $str);
    $str = preg_replace(array("/['|\"]/", "/[^\w|\.|\-|\[|\]]/"), array("", "-"), $str);
    return $str;
    }