aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-09-11 15:44:07 -0700
committerFriendika <info@friendika.com>2011-09-11 15:44:07 -0700
commit7a06c7c3bfcf4f496930efc8cef92f7dbe6f54a2 (patch)
treec592063fc63fe1f6cbaac8aa83bf96833f152dd1
parent0e441fe19618ab40722e79dfe531ae5a181fc990 (diff)
downloadvolse-hubzilla-7a06c7c3bfcf4f496930efc8cef92f7dbe6f54a2.tar.gz
volse-hubzilla-7a06c7c3bfcf4f496930efc8cef92f7dbe6f54a2.tar.bz2
volse-hubzilla-7a06c7c3bfcf4f496930efc8cef92f7dbe6f54a2.zip
bug #146 - br HTML tags showing up in events
-rw-r--r--include/bbcode.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/include/bbcode.php b/include/bbcode.php
index 86b7fdb4b..af6c10c44 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -15,6 +15,13 @@ function stripcode_br_cb($s) {
function bbcode($Text,$preserve_nl = false) {
+ // If we find any event code, turn it into an event.
+ // After we're finished processing the bbcode we'll
+ // replace all of the event code with a reformatted version.
+
+ $ev = bbtoevent($Text);
+
+
// Replace any html brackets with HTML Entities to prevent executing HTML or script
// Don't use strip_tags here because it breaks [url] search by replacing & with amp
@@ -27,11 +34,6 @@ function bbcode($Text,$preserve_nl = false) {
if($preserve_nl)
$Text = str_replace(array("\n","\r"), array('',''),$Text);
- // If we find any event code, turn it into an event.
- // After we're finished processing the bbcode we'll
- // replace all of the event code with a reformatted version.
-
- $ev = bbtoevent($Text);
// Set up the parameters for a URL search string
$URLSearchString = "^\[\]";