X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fbbcode.php;h=d1cb1a9110d3484a48f75e4dc66dd9e5ff379d89;hb=30efb0c1e641b0b9d3aa40a5a79897c6d06ac3ef;hp=fc2d97c13c5e3449f17c1d67d97b66873a049268;hpb=a5755b59a82bd0d1400a958bbdf9fa8b000189d2;p=friendica.git diff --git a/include/bbcode.php b/include/bbcode.php index fc2d97c13c..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,12 +328,30 @@ function bb_ShareAttributes($match) { if ($matches[1] != "") $profile = $matches[1]; - $headline = '
'.trim($match[3])."
'.trim($match[3])."