aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
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 /include/items.php
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 'include/items.php')
-rw-r--r--include/items.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/items.php b/include/items.php
index fbcac30cd..dfe92378a 100644
--- a/include/items.php
+++ b/include/items.php
@@ -1618,7 +1618,7 @@ function fix_private_photos($s,$uid) {
$a = get_app();
logger('fix_private_photos');
- if(preg_match("/\[img\](.+?)\[\/img\]/is",$s,$matches)) {
+ if(preg_match("/\[img\](.*?)\[\/img\]/is",$s,$matches)) {
$image = $matches[1];
logger('fix_private_photos: found photo ' . $image);
if(stristr($image ,$a->get_baseurl() . '/photo/')) {
@@ -1649,7 +1649,7 @@ function fix_private_photos($s,$uid) {
function item_getfeedtags($item) {
$ret = array();
$matches = false;
- $cnt = preg_match_all('|\#\[url\=(.+?)\](.+?)\[\/url\]|',$item['tag'],$matches);
+ $cnt = preg_match_all('|\#\[url\=(.*?)\](.*?)\[\/url\]|',$item['tag'],$matches);
if($cnt) {
for($x = 0; $x < count($matches); $x ++) {
if($matches[1][$x])
@@ -1657,7 +1657,7 @@ function item_getfeedtags($item) {
}
}
$matches = false;
- $cnt = preg_match_all('|\@\[url\=(.+?)\](.+?)\[\/url\]|',$item['tag'],$matches);
+ $cnt = preg_match_all('|\@\[url\=(.*?)\](.*?)\[\/url\]|',$item['tag'],$matches);
if($cnt) {
for($x = 0; $x < count($matches); $x ++) {
if($matches[1][$x])
@@ -1673,7 +1673,7 @@ function item_getfeedattach($item) {
if(count($arr)) {
foreach($arr as $r) {
$matches = false;
- $cnt = preg_match('|\[attach\]href=\"(.+?)\" size=\"(.+?)\" type=\"(.+?)\" title=\"(.+?)\"\[\/attach\]|',$r,$matches);
+ $cnt = preg_match('|\[attach\]href=\"(.*?)\" size=\"(.*?)\" type=\"(.*?)\" title=\"(.*?)\"\[\/attach\]|',$r,$matches);
if($cnt) {
$ret .= '<link rel="enclosure" href="' . xmlify($matches[1]) . '" type="' . xmlify($matches[3]) . '" ';
if(intval($matches[2]))