aboutsummaryrefslogtreecommitdiff
path: root/views/default/output/longtext.php
blob: 1c57375de71335b1de4ba226f83c10c399c9cf4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
/**
 * Elgg display long text
 * Displays a large amount of text, with new lines converted to line breaks
 *
 * @package Elgg
 * @subpackage Core
 * @author Curverider Ltd
 * @link http://elgg.org/
 *
 * @uses $vars['value'] The text to display
 * @uses $vars['parse_urls'] Whether to turn urls into links. Default is true.
 */

$parse_urls = isset($vars['parse_urls']) ? $vars['parse_urls'] : TRUE;

$text = $vars['value'];

$text = filter_tags($text);

if ($parse_urls) {
	$text = parse_urls($text);
}

$text = autop($text);

echo $text;