You want to "escape" html in your web page output.
You know you can use the PHP
htmlentities() method, but want to do it the Laravel way.
echo HTML::entities('<h1>Title example</h1>');
The above will convert the less than symbols to < and the greater than symbols to >
You can also use the helper function
echo e('<h1>Title example</h1>');
The above will produce the same output as the longer
This method actually calls
Specifically it calls
htmlentities($your_string, ENT_QUOTES, 'UTF-8', false).
This will convert quotes (both single and double), use UTF-8 as the character encoding and won't convert entities in the string already converted.