From a5d533cc41cfcae2d41aa7c9d0821b3a32786a21 Mon Sep 17 00:00:00 2001 From: sunnavy Date: Mon, 23 Dec 2024 17:23:06 -0500 Subject: [PATCH] Migrate deprecated "escape" to "encodeURIComponent" --- share/static/js/util.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/share/static/js/util.js b/share/static/js/util.js index c3f5ee8707..3bb6cbdaf1 100644 --- a/share/static/js/util.js +++ b/share/static/js/util.js @@ -818,7 +818,7 @@ jQuery(function() { if ( evt.detail.value ) { for ( const action of evt.detail.value ) { // Need to decode action that is UTF-8 encoded - jQuery.jGrowl(decodeURIComponent(escape(action)), { themeState: 'none' }); + jQuery.jGrowl(decodeURIComponent(encodeURIComponent(action)), { themeState: 'none' }); } const history_container = document.querySelector('.history-container'); @@ -854,7 +854,7 @@ jQuery(function() { }); document.body.addEventListener('titleChanged', function(evt) { - document.title = decodeURIComponent(escape(evt.detail.value)); + document.title = decodeURIComponent(encodeURIComponent(evt.detail.value)); }); document.body.addEventListener('triggerChanged', function(evt) { @@ -865,7 +865,7 @@ jQuery(function() { document.body.addEventListener('widgetTitleChanged', function(evt) { const title = evt.detail.elt.closest('div.titlebox').querySelector('.titlebox-title a'); if ( title ) { - title.innerHTML = decodeURIComponent(escape(evt.detail.value)); + title.innerHTML = decodeURIComponent(encodeURIComponent(evt.detail.value)); } });