Skip to content

Commit

Permalink
Add fix for markup in summary (cards)
Browse files Browse the repository at this point in the history
  • Loading branch information
occupant committed Sep 19, 2024
1 parent eeb9e38 commit 840e76c
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion templates/content/node--card-horizontal.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
#}
{% if not (node.body.isEmpty == true) and content.body is defined %}
{% if node.body.summary|length > 0 %}
{% set summary = node.body.summary %}
{% set summary = node.body.summary|striptags| check_markup('filtered_text') %}
{% else %}
{% set summaryraw = content.body.0['#text']|striptags %}
{% set summary = summaryraw| truncate(300,true,true)| check_markup('filtered_text') %}
Expand Down
2 changes: 1 addition & 1 deletion templates/content/node--card-image.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
#}
{% if not (node.body.isEmpty == true) and content.body is defined %}
{% if node.body.summary|length > 0 %}
{% set summary = node.body.summary %}
{% set summary = node.body.summary|striptags| check_markup('filtered_text') %}
{% else %}
{% set summaryraw = content.body.0['#text']|striptags %}
{% set summary = summaryraw| truncate(300,true,true)| check_markup('filtered_text') %}
Expand Down
2 changes: 1 addition & 1 deletion templates/content/node--card-vertical.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
#}
{% if not (node.body.isEmpty == true) and content.body is defined %}
{% if node.body.summary|length > 0 %}
{% set summary = node.body.summary %}
{% set summary = node.body.summary|striptags| check_markup('filtered_text') %}
{% else %}
{% set summaryraw = content.body.0['#text']|striptags %}
{% set summary = summaryraw| truncate(300,true,true)| check_markup('filtered_text') %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@

{% if not (node.body.isEmpty == true) and content.body is defined %}
{% if node.body.summary|length > 0 %}
{% set summary = node.body.summary %}
{% set summary = node.body.summary|striptags| check_markup('filtered_text') %}
{% else %}
{% set summaryraw = content.body.0['#text']|striptags %}
{% set summary = summaryraw| truncate(300,true,true)| check_markup('filtered_text') %}
Expand Down
2 changes: 1 addition & 1 deletion templates/content/node--ubc-event--card-image.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@

{% if not (node.body.isEmpty == true) and content.body is defined %}
{% if node.body.summary|length > 0 %}
{% set summary = node.body.summary %}
{% set summary = node.body.summary|striptags| check_markup('filtered_text') %}
{% else %}
{% set summaryraw = content.body.0['#text']|striptags %}
{% set summary = summaryraw| truncate(300,true,true)| check_markup('filtered_text') %}
Expand Down
2 changes: 1 addition & 1 deletion templates/content/node--ubc-event--card-vertical.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@

{% if not (node.body.isEmpty == true) and content.body is defined %}
{% if node.body.summary|length > 0 %}
{% set summary = node.body.summary %}
{% set summary = node.body.summary|striptags| check_markup('filtered_text') %}
{% else %}
{% set summaryraw = content.body.0['#text']|striptags %}
{% set summary = summaryraw| truncate(300,true,true)| check_markup('filtered_text') %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
#}
{% if not (node.body.isEmpty == true) and content.body is defined %}
{% if node.body.summary|length > 0 %}
{% set summary = node.body.summary %}
{% set summary = node.body.summary|striptags| check_markup('filtered_text') %}
{% else %}
{% set summaryraw = content.body.0['#text']|striptags %}
{% set summary = summaryraw| truncate(300,true,true)| check_markup('filtered_text') %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@

{% if not (node.body.isEmpty == true) and content.body is defined %}
{% if node.body.summary|length > 0 %}
{% set summary = node.body.summary %}
{% set summary = node.body.summary|striptags| check_markup('filtered_text') %}
{% else %}
{% set summaryraw = content.body.0['#text']|striptags %}
{% set summary = summaryraw| truncate(300,true,true)| check_markup('filtered_text') %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@

{% if not (node.body.isEmpty == true) and content.body is defined %}
{% if node.body.summary|length > 0 %}
{% set summary = node.body.summary %}
{% set summary = node.body.summary|striptags| check_markup('filtered_text') %}
{% else %}
{% set summaryraw = content.body.0['#text']|striptags %}
{% set summary = summaryraw| truncate(300,true,true)| check_markup('filtered_text') %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
#}
{% if not (node.body.isEmpty == true) and content.body is defined %}
{% if node.body.summary|length > 0 %}
{% set summary = node.body.summary %}
{% set summary = node.body.summary|striptags| check_markup('filtered_text') %}
{% else %}
{% set summaryraw = content.body.0['#text']|striptags %}
{% set summary = summaryraw| truncate(300,true,true)| check_markup('filtered_text') %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@

{% if not (node.body.isEmpty == true) and content.body is defined %}
{% if node.body.summary|length > 0 %}
{% set summary = node.body.summary %}
{% set summary = node.body.summary|striptags| check_markup('filtered_text') %}
{% else %}
{% set summaryraw = content.body.0['#text']|striptags %}
{% set summary = summaryraw| truncate(300,true,true)| check_markup('filtered_text') %}
Expand Down

0 comments on commit 840e76c

Please sign in to comment.