You are here

public function HamlCdataFilter::run in Sassy 7

* Run the filter *

Parameters

string text to filter: * @return string filtered text

Overrides HamlBaseFilter::run

File

phamlp/haml/filters/HamlCdataFilter.php, line 24

Class

HamlCdataFilter
CDATA Filter for {@link http://haml-lang.com/ Haml} class. Surrounds the filtered text with CDATA tags. @package PHamlP @subpackage Haml.filters

Code

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