You are here

class HamlEscapedFilter in Sassy 7

Escaped Filter for {@link http://haml-lang.com/ Haml} class. Escapes the text. Code to be interpolated can be included by wrapping it in #(). @package PHamlP @subpackage Haml.filters

Hierarchy

Expanded class hierarchy of HamlEscapedFilter

File

phamlp/haml/filters/HamlEscapedFilter.php, line 19

View source
class HamlEscapedFilter extends HamlBaseFilter {

  /**
   * Run the filter
   * @param string text to filter
   * @return string filtered text
   */
  public function run($text) {
    return preg_replace(HamlParser::MATCH_INTERPOLATION, '<?php echo htmlspecialchars($text); ?>', htmlspecialchars($text)) . "\n";
  }

}

Members

Namesort descending Modifiers Type Description Overrides
HamlBaseFilter::init public function * Initialise the filter. 2
HamlEscapedFilter::run public function * Run the filter * Overrides HamlBaseFilter::run