/** * Tests the text::auto_link_urls() function. * @dataProvider auto_link_urls_provider * @group core.helpers.text.auto_link_urls * @test */ public function auto_link_urls($text, $expected_result) { $result = text::auto_link_urls($text); $this->assertEquals($expected_result, $result); }
if ($option->tags) { ?> <div class="tags"> <?php foreach ($option->tags as $name => $set) { ?> <h5><?php echo ucfirst($name); ?> </h5> <ul> <?php foreach ($set as $tag) { ?> <li><?php echo text::auto_link_urls($tag); ?> </li> <?php } ?> </ul> <?php } ?> </div> <?php } ?> <a class="top" href="#top">(top)</a> </div>
/** * Converts text email addresses and anchors into links. * * @param string text to auto link * @return string */ public static function auto_link($text) { // Auto link emails first to prevent problems with "*****@*****.**" return text::auto_link_urls(text::auto_link_emails($text)); }
<?php echo html::nick($comment->author_id, $comment->author->username); ?> , <?php echo __(':ago ago', array(':ago' => html::time(date::timespan_short($comment->created), $comment->created))); ?> </header> <p> <?php echo $comment->private ? '<abbr title="' . __('Private comment') . '">' . __('Priv') . '</abbr>: ' : ''; ?> <?php echo text::smileys(text::auto_link_urls(html::specialchars($comment->comment))); ?> </p> </article> <?php } ?> <footer> <?php echo $pagination; ?> </footer>