From 14e06c0c631bc03b4804019bf32b45dac97667c3 Mon Sep 17 00:00:00 2001 From: brettp Date: Thu, 22 Oct 2009 21:00:21 +0000 Subject: Refs #1330: Contributed autop() to Wordpress. git-svn-id: http://code.elgg.org/elgg/trunk@3573 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/input.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/engine/lib/input.php b/engine/lib/input.php index 289542547..a412f3644 100644 --- a/engine/lib/input.php +++ b/engine/lib/input.php @@ -116,6 +116,12 @@ function parse_urls($text) { ), $text); } +/** + * + * Adds P tags. + * Borrowed from Wordpress. + * + **/ function autop($pee, $br = 1) { $pee = $pee . "\n"; // just to make things a little easier, pad the end $pee = preg_replace('|
\s*
|', "\n\n", $pee); @@ -359,4 +365,4 @@ function input_init() { } } -register_elgg_event_handler('init','system','input_init'); \ No newline at end of file +register_elgg_event_handler('init','system','input_init'); -- cgit v1.2.3