X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fbbcode.php;h=d1cb1a9110d3484a48f75e4dc66dd9e5ff379d89;hb=30efb0c1e641b0b9d3aa40a5a79897c6d06ac3ef;hp=081e4b7c6b0e7df55a6222cc108d7d9f86963d20;hpb=5eeccd519a372229b831387b451022fd72d59cbf;p=friendica.git
diff --git a/include/bbcode.php b/include/bbcode.php
index 081e4b7c6b..d1cb1a9110 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -1,8 +1,77 @@
".$st[2]."";
}
@@ -23,7 +92,7 @@ function cleancss($input) {
if (($char >= "a") and ($char <= "z"))
$cleaned .= $char;
- if (!(strpos(" #;:0123456789", $char) === false))
+ if (!(strpos(" #;:0123456789-_", $char) === false))
$cleaned .= $char;
}
@@ -259,22 +328,30 @@ function bb_ShareAttributes($match) {
if ($matches[1] != "")
$profile = $matches[1];
- $posted = "";
- preg_match("/posted='(.*?)'/ism", $attributes, $matches);
- if ($matches[1] != "")
- $posted = $matches[1];
+ $posted = "";
+
+ $itemcache = get_config("system","itemcache");
+
+ // relative dates only make sense when they aren't cached
+ if ($itemcache == "") {
+ preg_match("/posted='(.*?)'/ism", $attributes, $matches);
+ if ($matches[1] != "")
+ $posted = $matches[1];
+
+ preg_match('/posted="(.*?)"/ism', $attributes, $matches);
+ if ($matches[1] != "")
+ $posted = $matches[1];
- preg_match('/posted="(.*?)"/ism', $attributes, $matches);
- if ($matches[1] != "")
- $posted = $matches[1];
$reldate = (($posted) ? " " . relative_date($posted) : '');
+ }
- $headline = '
'.trim($match[3])."
'.trim($match[3])."