diff options
Diffstat (limited to 'include/bbcode.php')
-rw-r--r-- | include/bbcode.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/bbcode.php b/include/bbcode.php index 6a1c4b043..63dd9695e 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -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]')); |