/** * Echos the success/error feedback message directly as a HTML-safe string. */ public function echoMessage() { echo str::html($this->message()); }
/** * Creates a link tag * * @param string $link The URL * @param string $text Specify a text for the link tag. If false the URL will be used * @return string */ static function link($link, $text = false) { $text = $text ? $text : $link; return '<a href="' . $link . '">' . str::html($text) . '</a>'; }
/** * Echos the success/error feedback message directly as a HTML-safe string. * Either from one specified action or from all actions. * * @param mixed $action (optional) the index of the action to get the * feedback message from */ public function echoMessage($action = false) { echo str::html($this->message($action)); }
function html($text) { return str::html($text, false); }
public function testHtml() { $this->assertEquals('Super Äwesøme String', str::html($this->sample)); }
function testHtml() { $this->assertEqual(str::html("some <em>über crazy</em> stuff"), 'some <em>über crazy</em> stuff'); $this->assertEqual(str::html('some <em>über crazy</em> stuff', false), 'some <em>über crazy</em> stuff'); }