From 6173ce4e2f45dbfd0402c0a2e98b4d5aed588fe2 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Tue, 22 Feb 2011 00:35:23 -0500 Subject: Use encodeURIComponent in the new link generation --- data/js/bug-page-mod.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/js/bug-page-mod.js b/data/js/bug-page-mod.js index 2af545d..2a8c817 100644 --- a/data/js/bug-page-mod.js +++ b/data/js/bug-page-mod.js @@ -1162,7 +1162,7 @@ function addNewLinks(d) { if (product) { var label = d.getElementById('field_container_product'); var span = d.createElement('span'); - var url = 'enter_bug.cgi?product=' + product.value; + var url = 'enter_bug.cgi?product=' + encodeURIComponent(product.value); span.innerHTML = "(new)"; if (label && span) { label.appendChild(span); @@ -1172,7 +1172,7 @@ function addNewLinks(d) { if (product && component) { var select = d.querySelector("select#component"); var span = d.createElement('span'); - var url = 'enter_bug.cgi?product=' + product.value + '&component=' + component.value; + var url = 'enter_bug.cgi?product=' + encodeURIComponent(product.value) + '&component=' + encodeURIComponent(component.value); span.innerHTML = "(new)"; if (select && span) { select.parentNode.appendChild(span); -- cgit