mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-29 16:54:04 +02:00
js/icinga/utils: Implement fixedEncodeURIComponent method
* FYI: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent refs #9347
This commit is contained in:
parent
bebff5b83e
commit
ebd103f7ee
@ -307,6 +307,19 @@
|
|||||||
destroy: function () {
|
destroy: function () {
|
||||||
this.urlHelper = null;
|
this.urlHelper = null;
|
||||||
this.icinga = null;
|
this.icinga = null;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Encode the parenthesis too
|
||||||
|
*
|
||||||
|
* @param str {String} A component of a URI
|
||||||
|
*
|
||||||
|
* @returns {String} Encoded component
|
||||||
|
*/
|
||||||
|
fixedEncodeURIComponent: function (str) {
|
||||||
|
return encodeURIComponent(str).replace(/[()]/g, function(c) {
|
||||||
|
return '%' + c.charCodeAt(0).toString(16);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user