- Fixed a bug where a custom form context would never be applied

This commit is contained in:
mcndave committed 2020-03-31 11:09:08 -04:00
1 parent 23e8eb71f6
commit ff57fed699
6 files changed
+92 -6

No files matched your search

+2 -2
View File
@@ -19,12 +19,12 @@ class UiPopup extends UiElement implements Extension {
public function parse(/*\Picae\Compiler\Context*/ &$context, ?string $arguments, string $token) : string
{
return "<?php echo ( new \\" . static::class . "() )->buildAttributes($arguments) ?>";
return "<?php echo 'ui-popup=\"' . ( new \\" . static::class . "() )->buildAttributes($arguments) . '\"' ?>";
}
public function buildAttributes(string $name, array $variables = []) : string
{
return json_encode([ "name" => $name, "vars" => $variables ], JSON_HEX_APOS | JSON_HEX_QUOT);
return htmlentities(json_encode([ "name" => $name, "vars" => $variables ], JSON_HEX_APOS | JSON_HEX_QUOT), ENT_QUOTES, 'UTF-8');
}
}