Skip to content

Commit 9a76940

Browse files
authored
#3558421 Fixed menu items to remove html entities from output. (#1450)
1 parent b015b5f commit 9a76940

File tree

3 files changed

+513
-397
lines changed

3 files changed

+513
-397
lines changed

web/themes/contrib/civictheme/civictheme.post_update.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -892,6 +892,10 @@ function civictheme_post_update_update_sidebar_navigation_suggestion(): string {
892892
* @SuppressWarnings(PHPMD.StaticAccess)
893893
*/
894894
function civictheme_post_update_add_civictheme_message_paragraph(): string {
895+
$paragraph_type_config = \Drupal::config('paragraphs.paragraphs_type.civictheme_message');
896+
if (!$paragraph_type_config->isNew()) {
897+
return (string) new TranslatableMarkup('civictheme_message paragraph type already exists. Skipping update.');
898+
}
895899
$new_configs = [
896900
// Paragraph type definition.
897901
'paragraphs.paragraphs_type.civictheme_message' => 'paragraphs_type',

web/themes/contrib/civictheme/includes/menu.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function _civictheme_preprocess_menu_items(array &$items, bool $expand_all = FAL
2828
$item['is_expanded'] = $expand_all || ($item['is_expanded'] ?? FALSE);
2929
// Initialize 'below' as an empty array if not set.
3030
$item['below'] = $item['below'] ?? [];
31-
$item['title'] = isset($item['title']) ? Xss::filter($item['title']) : '';
31+
$item['title'] = isset($item['title']) ? strip_tags($item['title']) : '';
3232

3333
if (!empty($item['below'])) {
3434
_civictheme_preprocess_menu_items($item['below'], $expand_all);

0 commit comments

Comments
 (0)