aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-06-07 22:13:07 -0700
committerFriendika <info@friendika.com>2011-06-07 22:13:07 -0700
commite2f1540f25cae5b647fbebacac105d03cff17502 (patch)
treef4ae61e2cca0f923c919edc80a2ebc2a0f1e5e15 /mod
parent33fe26ecb01ec009a639c4c8fdfc4f93b2bd34ac (diff)
downloadvolse-hubzilla-e2f1540f25cae5b647fbebacac105d03cff17502.tar.gz
volse-hubzilla-e2f1540f25cae5b647fbebacac105d03cff17502.tar.bz2
volse-hubzilla-e2f1540f25cae5b647fbebacac105d03cff17502.zip
events, continued. Also better regex matching accounting for empty elements
Diffstat (limited to 'mod')
-rw-r--r--mod/item.php4
-rw-r--r--mod/message.php2
2 files changed, 3 insertions, 3 deletions
diff --git a/mod/item.php b/mod/item.php
index 0fb780adc..2c8cf256c 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -196,7 +196,7 @@ function item_post(&$a) {
$match = null;
- if(preg_match_all("/\[img\](.+?)\[\/img\]/",$body,$match)) {
+ if(preg_match_all("/\[img\](.*?)\[\/img\]/",$body,$match)) {
$images = $match[1];
if(count($images)) {
foreach($images as $image) {
@@ -235,7 +235,7 @@ function item_post(&$a) {
$match = false;
- if(preg_match_all("/\[attachment\](.+?)\[\/attachment\]/",$body,$match)) {
+ if(preg_match_all("/\[attachment\](.*?)\[\/attachment\]/",$body,$match)) {
$attaches = $match[1];
if(count($attaches)) {
foreach($attaches as $attach) {
diff --git a/mod/message.php b/mod/message.php
index 21f7b935e..ad598eb7d 100644
--- a/mod/message.php
+++ b/mod/message.php
@@ -78,7 +78,7 @@ function message_post(&$a) {
$match = null;
- if(preg_match_all("/\[img\](.+?)\[\/img\]/",$body,$match)) {
+ if(preg_match_all("/\[img\](.*?)\[\/img\]/",$body,$match)) {
$images = $match[1];
if(count($images)) {
foreach($images as $image) {