Show
Ignore:
Timestamp:
12/25/07 18:06:03 (5 years ago)
Author:
d0nut
Message:

here is the code of deviantart bbcode 1.1 - packagerelease was two weeks ago, sorry.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • bbcode.deviantart/files/lib/data/message/bbcode/DeviantArtBBCode.class.php

    r78 r139  
    2222                // id as input 
    2323                        $id = intval($content); 
    24                 } else if(strpos($content, 'http://') == 0){ 
     24                } else if(strpos($content, 'http://') == 0 && preg_match('/-(\d+)$/', $content, $hits)){ 
    2525                // url as input 
    26                         preg_match('/-(\d+)$/', $content, $hits); 
    2726                        $id = intval($hits[1]); 
    28                 } else if(strpos($content, '<object') == 0){ 
     27                } else if(strpos($content, '<object') !== false){ 
    2928                // html as input 
    3029                        preg_match('/^<object width\="(\d+)" height\="(\d+)">.+value\="id\=(\d+)"/', $content, $hits); 
     
    3534                } else { 
    3635                        return; 
     36                } 
     37                 
     38                // overwrite width/height from attribute 
     39                if(isset($openingTag['attributes'][0])) { 
     40                        list($width,$height) = explode("x", $openingTag['attributes'][0]); 
    3741                } 
    3842