Skip to content

Commit b027fc1

Browse files
authored
Merge pull request #42 from waldez/fix-apidriver
Helper for sanitization of uri parameters
2 parents cdd93f0 + 1ff0b46 commit b027fc1

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

api-driver/RouteConfig.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
'use strict';
2-
var Handlebars = require('handlebars');
2+
3+
const querystring = require('querystring');
4+
const Handlebars = require('handlebars');
5+
Handlebars.registerHelper('escapeurl', function(url) {
6+
7+
return new Handlebars.SafeString(querystring.escape(url));
8+
});
39

410
/**
511
* Route config.
@@ -8,9 +14,9 @@ var Handlebars = require('handlebars');
814
* @param {String} [routeConfig.customImplementationsModule]
915
* @constructor
1016
*/
11-
var RouteConfig = function(fullName, routeConfig) {
17+
const RouteConfig = function(fullName, routeConfig) {
1218

13-
var fullNameArray = fullName.split('.');
19+
const fullNameArray = fullName.split('.');
1420

1521
/**
1622
* @type {Object}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "appmixer-lib",
3-
"version": "0.0.2",
3+
"version": "0.0.3",
44
"description": "Shared lib folder.",
55
"main": "appmixer-lib.js",
66
"scripts": {

0 commit comments

Comments
 (0)