aboutsummaryrefslogtreecommitdiffstats
path: root/include/bb2diaspora.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-06-23 21:11:41 -0700
committerfriendica <info@friendica.com>2012-06-23 21:11:41 -0700
commit92a997365f98cdca4d1537f3de9bbec91d820d8e (patch)
treeb1c8e042ebaba3cfbd887bcb943a038d58983008 /include/bb2diaspora.php
parent1574396d04ead2e410aa992b049fe63422080bab (diff)
parent642880f89aec9d1ee5ad2acf94b30e2876a2a924 (diff)
downloadvolse-hubzilla-92a997365f98cdca4d1537f3de9bbec91d820d8e.tar.gz
volse-hubzilla-92a997365f98cdca4d1537f3de9bbec91d820d8e.tar.bz2
volse-hubzilla-92a997365f98cdca4d1537f3de9bbec91d820d8e.zip
Merge https://github.com/friendica/friendica into pull
Diffstat (limited to 'include/bb2diaspora.php')
-rw-r--r--include/bb2diaspora.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php
index 75ba57dff..ac693127b 100644
--- a/include/bb2diaspora.php
+++ b/include/bb2diaspora.php
@@ -131,6 +131,12 @@ function bb2diaspora($Text,$preserve_nl = false) {
$md = new Markdownify(false, false, false);
$Text = $md->parseString($Text);
+ // If the text going into bbcode() has a plain URL in it, i.e.
+ // with no [url] tags around it, it will come out of parseString()
+ // looking like: <http://url.com>, which gets removed by strip_tags().
+ // So take off the angle brackets of any such URL
+ $Text = preg_replace("/<http(.*?)>/is", "http$1", $Text);
+
// Remove all unconverted tags
$Text = strip_tags($Text);