Example #1
0
function autolink($text, $limit = 30, $tagfill = '', $auto_title = true)
{
    $text = autolink_do($text, '![a-z][a-z-]+://!i', $limit, $tagfill, $auto_title);
    $text = autolink_do($text, '!(mailto|skype):!i', $limit, $tagfill, $auto_title);
    $text = autolink_do($text, '!www\\.!i', $limit, $tagfill, $auto_title, 'http://');
    $text = autolink_email($text);
    return $text;
}
Example #2
0
function parse_desc($text)
{
    // Don't allow tags and make the description HTML-safe
    $text = phpc_html_escape($text);
    $text = nl2br($text);
    // linkify urls
    $text = autolink($text, 0);
    // linkify emails
    $text = autolink_email($text);
    return $text;
}
		<dd><?php 
    echo $announcement['Where'];
    ?>
</dd>
		<?php 
}
if ($announcement['Sponsor'] !== '') {
    ?>
		<dt>Sponsor</dt>
		<dd><?php 
    echo $announcement['Sponsor'];
    ?>
</dd>
		<?php 
}
if ($announcement['Contact'] !== '') {
    ?>
		<dt>Contact</dt>
		<dd><?php 
    echo autolink_email($announcement['Contact']);
    ?>
</dd>
		<?php 
}
?>
	</dl>
</article>
<div class="bottom">
	<a onclick="changeChannel($(this).closest('section'), 'default'); return false;" href="">go back</a>
</div>
Example #4
0
function detect_links($str)
{
    $str = autolink($str);
    $str = autolink_email($str);
    return $str;
}
Example #5
0
function parse_desc($text)
{
    // Don't allow tags and make the description HTML-safe
    $text = htmlspecialchars($text, ENT_COMPAT, "UTF-8");
    $text = nl2br($text);
    // linkify urls
    $text = autolink($text, 0);
    // linkify emails
    $text = autolink_email($text);
    return $text;
}