This commit is contained in:
Zach Prezkuta 2012-07-07 18:47:13 -06:00
parent 173b3a1b9a
commit da2ccebed8
4 changed files with 33 additions and 19 deletions

View file

@ -66,10 +66,10 @@ function bb_extract_images($body) {
if(! strcmp(substr($orig_body, $img_start + $img_st_close, 5), 'data:')) {
// This is an embedded image
$saved_image[$cnt] = substr($orig_body, $img_start + $img_st_close, $img_end - $img_start);
$cnt++;
$saved_image[$cnt] = substr($orig_body, $img_start + $img_st_close, $img_end - ($img_start + $img_st_close));
$new_body = $new_body . substr($orig_body, 0, $img_start) . '[$#saved_image' . $cnt . '#$]';
$cnt++;
}
else
$new_body = $new_body . substr($orig_body, 0, $img_end + strlen('[/img]'));