converter/src/app/converter/uriencoder.js

17 lines
452 B
JavaScript
Raw Normal View History

"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;