From 5fddbe27c0b049725e01981282fa87c715f94d34 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Tue, 29 Oct 2019 16:11:10 -0700 Subject: [PATCH] ArrayHtml - Treat `` and `` as self-closing tags --- ext/afform/core/CRM/Afform/ArrayHtml.php | 2 ++ ext/afform/mock/tests/phpunit/api/v4/formatExamples/banana.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ext/afform/core/CRM/Afform/ArrayHtml.php b/ext/afform/core/CRM/Afform/ArrayHtml.php index 748dadfec3..6f51179262 100644 --- a/ext/afform/core/CRM/Afform/ArrayHtml.php +++ b/ext/afform/core/CRM/Afform/ArrayHtml.php @@ -22,11 +22,13 @@ class CRM_Afform_ArrayHtml { '*' => 'text', ], 'af-entity' => [ + '#selfClose' => TRUE, 'name' => 'text', 'type' => 'text', 'data' => 'js', ], 'af-field' => [ + '#selfClose' => TRUE, 'name' => 'text', 'defn' => 'js', ], diff --git a/ext/afform/mock/tests/phpunit/api/v4/formatExamples/banana.php b/ext/afform/mock/tests/phpunit/api/v4/formatExamples/banana.php index 779b3cd446..bf33a0a21f 100644 --- a/ext/afform/mock/tests/phpunit/api/v4/formatExamples/banana.php +++ b/ext/afform/mock/tests/phpunit/api/v4/formatExamples/banana.php @@ -1,7 +1,7 @@ '
New text!
', + 'html' => '
New text!
', 'shallow' => [ [ '#tag' => 'div', -- 2.25.1