- Fixed a bug where a custom form context would never be applied
This commit is contained in:
1 parent
23e8eb71f6
commit
ff57fed699
6 files changed
+92
-6
No files matched your search
@@ -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');
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user