X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fbbcode.php;h=d1cb1a9110d3484a48f75e4dc66dd9e5ff379d89;hb=30efb0c1e641b0b9d3aa40a5a79897c6d06ac3ef;hp=ebed0dbb255b60da06dd387f907de0c693193736;hpb=570f67187d508b1790fef5ef0be9a7937b029567;p=friendica.git diff --git a/include/bbcode.php b/include/bbcode.php index ebed0dbb25..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; } @@ -36,7 +105,12 @@ function stripcode_br_cb($s) { function tryoembed($match){ $url = ((count($match)==2)?$match[1]:$match[2]); -// logger("tryoembed: $url"); + + // Always embed the SSL version + $url = str_replace(array("http://www.youtube.com/", "http://player.vimeo.com/"), + array("https://www.youtube.com/", "https://player.vimeo.com/"), $url); + + //logger("tryoembed: $url"); $o = oembed_fetch_url($url); @@ -254,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 = ""; - preg_match('/posted="(.*?)"/ism', $attributes, $matches); - if ($matches[1] != "") - $posted = $matches[1]; - $reldate = (($posted) ? " " . relative_date($posted) : ''); + $itemcache = get_config("system","itemcache"); - $headline = '
'.trim($match[3])."
'.trim($match[3])."