Skip to content

Commit

Permalink
Merge pull request #39 from symbiote/fix-children
Browse files Browse the repository at this point in the history
fix(ComponentService): Malformed children template code
  • Loading branch information
nyeholt authored Apr 29, 2019
2 parents 86a21ed + a9fa4c1 commit 4c56b47
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Symbiote/Components/ComponentService.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ private static function handleChildHTML($data, $properties, $parser)
// construct php
$value = $data['Children']['php'];
$php = "\$_props['children'] = '';\n" . $value;
$php = str_replace("\$_props = array();\n", "", $php);
$php = str_replace("unset(\$_props);\n", "", $php);
$php = str_replace("\$val .=", "\$_props['children'] .=", $php);
$php .= "\$_props['children'] = SilverStripe\ORM\FieldType\DBField::create_field('HTMLText', \$_props['children']);\n";

Expand Down

0 comments on commit 4c56b47

Please sign in to comment.