17 lines
452 B
JavaScript
17 lines
452 B
JavaScript
"use strict";
|
|
var URIEncoder = (function () {
|
|
function URIEncoder() {
|
|
}
|
|
URIEncoder.prototype.getDisplayname = function () {
|
|
return "Encode URI";
|
|
};
|
|
URIEncoder.prototype.getId = function () {
|
|
return "uriencode";
|
|
};
|
|
URIEncoder.prototype.convert = function (input) {
|
|
return encodeURI(input).replace(/%5B/g, '[').replace(/%5D/g, ']');
|
|
};
|
|
return URIEncoder;
|
|
}());
|
|
exports.URIEncoder = URIEncoder;
|