original_string: public function html(string $text, bool $lineBreaks = false) : string
      {
          $html = htmlspecialchars($text, ENT_QUOTES, 'UTF-8');
  
          return $lineBreaks ? nl2br($html) : $html;
      }
code: public function html(string $text, bool $lineBreaks = false) : string
      {
          $html = htmlspecialchars($text, ENT_QUOTES, 'UTF-8');
  
          return $lineBreaks ? nl2br($html) : $html;
      }
code_tokens: public function html ( string $ text , bool $ lineBreaks = false ) : string { $ html = htmlspecialchars ( $ text , ENT_QUOTES , 'UTF-8' ) ; return $ lineBreaks ? nl2br ( $ html ) : $ html ; }
docstring: HTML-escapes a text string.
  
  This is the single most important protection against XSS attacks:
  any user-originated data, or more generally any data that is not known to be valid and trusted HTML,
  must be escaped before being displayed in a web page.
  
  @param string $text       The text to escape.
  @param bool   $lineBreaks Whether to escape line breaks. Defaults to `false`.
  
  @return string
docstring_tokens: HTML - escapes a text string .