html($text, $keepTags = true)

Converts any text to valid HTML

  • $text (string)
  • $keepTags (boolean)
    Preserve HTML tags
  • return (string)

Example

With a single option

<?php echo html($page->title()) ?>

Don't preserve HTML tags

<?php echo html($page->title(), false) ?>