Skip to content

Commit

Permalink
Merge pull request #1486 from openeuropa/EWPP-4580
Browse files Browse the repository at this point in the history
EWPP-4580: Allow additional html tags to be rendered in CTs summary field.
  • Loading branch information
upchuk authored Aug 28, 2024
2 parents 1ef6222 + 61add88 commit 64d7170
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ protected function getIntroductionMetadata(string $field_name): array {
// We strip the tags because the ECL component expects only one paragraph
// of text and the field is using a text format which adds paragraph tags.
'#type' => 'inline_template',
'#template' => '{{ summary|render|striptags("<strong><a><em><svg><use><span>")|raw }}',
'#template' => '{{ summary|render|striptags("<strong><a><em><svg><use><span><sub><sup><u>")|raw }}',
'#context' => [
'summary' => [
'#type' => 'processed_text',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function testRendering(): void {
// Enable the test plugin and add some metadata.
$test_data = [
'title' => 'Custom page title.',
'introduction' => 'Custom page introduction.',
'introduction' => '<u>Custom page</u> introduction with <sub>rich</sub> <sup>text</sup>.',
'metas' => [
'Custom meta 1',
'Custom meta 2',
Expand Down

0 comments on commit 64d7170

Please sign in to comment.