From 49700eb6c692528d7ae14da883c852daf6cfe326 Mon Sep 17 00:00:00 2001 From: Keanu Delgado Date: Thu, 9 Feb 2017 09:33:29 -0500 Subject: [PATCH] Allow single quote characters in literals Single quotes are valid in uris, so we do not want to break users of this library who may have single quotes in their templates. --- src/URITemplate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/URITemplate.js b/src/URITemplate.js index 0280fa73..5c240c2f 100644 --- a/src/URITemplate.js +++ b/src/URITemplate.js @@ -137,7 +137,7 @@ // pattern to verify variable name integrity URITemplate.VARIABLE_NAME_PATTERN = /[^a-zA-Z0-9%_.]/; // pattern to verify literal integrity - URITemplate.LITERAL_PATTERN = /[<>{}'"`^| \\]/; + URITemplate.LITERAL_PATTERN = /[<>{}"`^| \\]/; // expand parsed expression (expression, not template!) URITemplate.expand = function(expression, data) {