aboutsummaryrefslogtreecommitdiffstats
path: root/include/bbcode.php
diff options
context:
space:
mode:
authorZach Prezkuta <fermion@gmx.com>2012-07-07 18:47:13 -0600
committerZach Prezkuta <fermion@gmx.com>2012-07-07 18:50:33 -0600
commitda2ccebed8f1c87b0481ba476b4d13e601ce5feb (patch)
tree285173179d117fc8812d3389b01f393112b6281d /include/bbcode.php
parent173b3a1b9ad926937ec152e41756c5b63f6c5951 (diff)
downloadvolse-hubzilla-da2ccebed8f1c87b0481ba476b4d13e601ce5feb.tar.gz
volse-hubzilla-da2ccebed8f1c87b0481ba476b4d13e601ce5feb.tar.bz2
volse-hubzilla-da2ccebed8f1c87b0481ba476b4d13e601ce5feb.zip
fix bugs
Diffstat (limited to 'include/bbcode.php')
-rw-r--r--include/bbcode.php6
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]'));