aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/bbcode.php
diff options
context:
space:
mode:
authorJames Atkinson <thefinn@users.sourceforge.net>2001-05-26 00:25:50 +0000
committerJames Atkinson <thefinn@users.sourceforge.net>2001-05-26 00:25:50 +0000
commitbb1679af9a8079e5531ef743e51c548a6e7e820b (patch)
tree0b7e113f2141d6a3f63fc96557049fb50c4a4bea /phpBB/includes/bbcode.php
parent0fee31117bf2573efbea4a8b2a70b16b648adb79 (diff)
downloadforums-bb1679af9a8079e5531ef743e51c548a6e7e820b.tar
forums-bb1679af9a8079e5531ef743e51c548a6e7e820b.tar.gz
forums-bb1679af9a8079e5531ef743e51c548a6e7e820b.tar.bz2
forums-bb1679af9a8079e5531ef743e51c548a6e7e820b.tar.xz
forums-bb1679af9a8079e5531ef743e51c548a6e7e820b.zip
Lots of work on posting. New topic and reply functionality is mostly done. Edit post loads the form but needs database functionality
All this is only been tested on Postgres, donno if it works as well on MySQL yet, will test when I can get access to sourceforge again git-svn-id: file:///svn/phpbb/trunk@328 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/bbcode.php')
-rw-r--r--phpBB/includes/bbcode.php32
1 files changed, 32 insertions, 0 deletions
diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php
index b1a6a794cc..b7c1028db4 100644
--- a/phpBB/includes/bbcode.php
+++ b/phpBB/includes/bbcode.php
@@ -440,6 +440,38 @@ function make_clickable($text)
return($ret);
}
+/**
+ * Nathan Codding - Feb 6, 2001
+ * Reverses the effects of make_clickable(), for use in editpost.
+ * - Does not distinguish between "www.xxxx.yyyy" and "http://aaaa.bbbb" type URLs.
+ *
+ */
+
+function undo_make_clickable($text) {
+
+ $text = preg_replace("#<!-- BBCode auto-link start --><a href=\"(.*?)\" target=\"_blank\">.*?</a><!-- BBCode auto-link end -->#i", "\\1", $text);
+ $text = preg_replace("#<!-- BBcode auto-mailto start --><a href=\"mailto:(.*?)\">.*?</a><!-- BBCode auto-mailto end -->#i", "\\1", $text);
+
+ return $text;
+
+}
+
+
+
+/**
+ * Nathan Codding - August 24, 2000.
+ * Takes a string, and does the reverse of the PHP standard function
+ * htmlspecialchars().
+ */
+function undo_htmlspecialchars($input) {
+ $input = preg_replace("/&gt;/i", ">", $input);
+ $input = preg_replace("/&lt;/i", "<", $input);
+ $input = preg_replace("/&quot;/i", "\"", $input);
+ $input = preg_replace("/&amp;/i", "&", $input);
+
+ return $input;
+}
+
/**