Skip to content

Commit

Permalink
[JENKINS-48136] Encode job name (#21)
Browse files Browse the repository at this point in the history
URI encoded characters (such as forward slashes) were decoded when
they should not be, preventing jobs with such characters in their
names from being manually added/removed from the favorites list.

Fixes JENKINS-48136.
  • Loading branch information
davidparsson authored and James William Dumay committed Mar 22, 2018
1 parent a70021f commit 983893f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/resources/hudson/plugins/favorite/assets.js
@@ -1,5 +1,5 @@
function toggleFavorite(job, a) {
new Ajax.Request(rootURL + "/plugin/favorite/toggleFavorite?job=" + job, {method: 'POST'});
new Ajax.Request(rootURL + "/plugin/favorite/toggleFavorite?job=" + encodeURIComponent(job), {method: 'POST'});
var favIcon = document.getElementById("fav_" + job);
if (favIcon.classList.contains("icon-fav-inactive")) {
favIcon.classList.add("icon-fav-active");
Expand Down

0 comments on commit 983893f

Please sign in to comment.