Skip to content

Commit

Permalink
Merge branch '6.0/migrate-js-escape'
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrandtbuffalo committed Dec 30, 2024
2 parents 27442d0 + a5d533c commit b6bb8e8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions share/static/js/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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) {
Expand All @@ -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));
}
});

Expand Down

0 comments on commit b6bb8e8

Please sign in to comment.