aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEhsan Akhgari <ehsan@mozilla.com>2011-02-22 00:35:23 -0500
committerEhsan Akhgari <ehsan@mozilla.com>2011-02-22 00:35:23 -0500
commit6173ce4e2f45dbfd0402c0a2e98b4d5aed588fe2 (patch)
tree28412ecb8bc499cce3a3357464ce60c56626bf33
parent7aaa7c6fe5e147ecff18d15bfd024f627247f8fe (diff)
downloadbugzilla-triage-6173ce4e2f45dbfd0402c0a2e98b4d5aed588fe2.tar.gz
Use encodeURIComponent in the new link generation
-rw-r--r--data/js/bug-page-mod.js4
1 files 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 = "(<a href='" + url + "'>new</a>)";
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 = "(<a href='" + url + "'>new</a>)";
if (select && span) {
select.parentNode.appendChild(span);