aboutsummaryrefslogtreecommitdiff
path: root/views/default/output/longtext.php
blob: 22a4ad46df95f1b21540e1ce028e249c9dbaa0ee (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
<?php
/**
 * Elgg display long text
 * Displays a large amount of text, with new lines converted to line breaks
 *
 * @package Elgg
 * @subpackage Core
 *
 * @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;