diff options
author | fermionic <fermion@gmx.com> | 2012-06-23 21:08:19 -0700 |
---|---|---|
committer | fermionic <fermion@gmx.com> | 2012-06-23 21:08:19 -0700 |
commit | 38b8317726ea2f4051e8c40bfa661f213ee33820 (patch) | |
tree | b6fa2c8ef826faf0133398a66a75031a526ec768 | |
parent | 098c74a12a7b370ccd9ca6d10987feac4b0d61d3 (diff) | |
parent | 5d2eed35177da3debacc6db6db2f7a74bc4b64c7 (diff) | |
download | volse-hubzilla-38b8317726ea2f4051e8c40bfa661f213ee33820.tar.gz volse-hubzilla-38b8317726ea2f4051e8c40bfa661f213ee33820.tar.bz2 volse-hubzilla-38b8317726ea2f4051e8c40bfa661f213ee33820.zip |
Merge pull request #355 from fermionic/missing-urls-after-strip_tags-in-bb2diaspora
allow bare URLS to make it through to Diaspora
-rw-r--r-- | include/bb2diaspora.php | 6 |
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); |