$msg = JRequest::getVar('msgpreview', '', 'post') ? JRequest::getVar('msgpreview', '', 'post') : (isset($_GET['Joni_message']) ? $_GET['Joni_message'] : "");
		$msg = urldecode($msg);
		if (strpos($msg, "[html]") === false && strpos($msg, "[HTML]") === false) {
			$text = preg_replace('/(?<!S)((http(s?):\/\/)|(www\.[a-zA-Z0-9-_]+\.))+([a-zA-Z0-9\/*+-_?&;:%=.,#]+)/', '<a href="http$3://$4$5" target="_blank" rel="nofollow">$4$5</a>', $text);

			// match name@address
			$text = preg_replace('/(?<!S)([a-zA-Z0-9_.\-]+\@[a-zA-Z][a-zA-Z0-9_.\-]+[a-zA-Z]{2,6})/', '<a href="mailto:$1">$1</a>', $text);
		}
		$_GET['Joni_message'] = "";