From f0d92e1c56041a0f955f794599fcc606ab056e0c Mon Sep 17 00:00:00 2001 From: Moh Atia Date: Tue, 9 Apr 2024 11:17:41 -0400 Subject: [PATCH 1/2] filter html from serarch titles --- wp/wp-content/themes/phila.gov-theme/js/dev/search.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp/wp-content/themes/phila.gov-theme/js/dev/search.js b/wp/wp-content/themes/phila.gov-theme/js/dev/search.js index c3feb8a103..d50669c26f 100644 --- a/wp/wp-content/themes/phila.gov-theme/js/dev/search.js +++ b/wp/wp-content/themes/phila.gov-theme/js/dev/search.js @@ -48,7 +48,7 @@ module.exports = jQuery(document).ready(function($) { var view = { url: encodeURI(item.url), - title: item.title, + title:item.title.replace(/<[^>]*>?/gm, ''), summary: item.highlight.body || (item.body.length > 250 ? item.body.substring(0, 250) + '...' : item.body), content_type: item.content_type, icon: '' From 68fc71e7d723bd485c59f3b4163833cf44413ba4 Mon Sep 17 00:00:00 2001 From: Moh Atia Date: Tue, 9 Apr 2024 11:18:18 -0400 Subject: [PATCH 2/2] filter html from serarch titles --- wp/wp-content/themes/phila.gov-theme/js/dev/search.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp/wp-content/themes/phila.gov-theme/js/dev/search.js b/wp/wp-content/themes/phila.gov-theme/js/dev/search.js index d50669c26f..a7f31210ba 100644 --- a/wp/wp-content/themes/phila.gov-theme/js/dev/search.js +++ b/wp/wp-content/themes/phila.gov-theme/js/dev/search.js @@ -48,7 +48,7 @@ module.exports = jQuery(document).ready(function($) { var view = { url: encodeURI(item.url), - title:item.title.replace(/<[^>]*>?/gm, ''), + title: item.title.replace(/<[^>]*>?/gm, ''), summary: item.highlight.body || (item.body.length > 250 ? item.body.substring(0, 250) + '...' : item.body), content_type: item.content_type, icon: ''