You are here

public function HamlEscapedFilter::run in Sassy 7

* Run the filter *

Parameters

string text to filter: * @return string filtered text

Overrides HamlBaseFilter::run

File

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

Class

HamlEscapedFilter
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

Code

public function run($text) {
  return preg_replace(HamlParser::MATCH_INTERPOLATION, '<?php echo htmlspecialchars($text); ?>', htmlspecialchars($text)) . "\n";
}