50 $pattern =
'#<!--START '
51 . static::SLICE_SECTION_ID .
'/([\w]+?)/([\w]+?)/-->'
53 .
'<!--END ' . static::SLICE_SECTION_ID .
'[/\w]+?-->#';
56 if(preg_match_all($pattern, $string, $matches))
58 $matchesCount = count($matches[0]);
59 for($i = 0; $i < $matchesCount; $i++)
61 $section = trim($matches[1][$i]);
62 $place = trim($matches[2][$i]);
63 $value = trim($matches[3][$i]);
65 $blockContent->add($section, $place, $value);
101 if (!self::isValid($string))
103 return Block\Sanitizer::clean($string);
107 $list = $content->getList();
108 foreach ($list as $index => $item)
115 $item[
'value'] = Block\Sanitizer::clean($item[
'value']);
116 $list[$index] = $item;
119 $content->setList($list);