Skip to content

Commit

Permalink
fix(templates): Allow single quote characters in literals (#326)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
keanu-delgado authored and rodneyrehm committed Feb 10, 2017
1 parent dfc50a0 commit 06c54b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/URITemplate.js
Expand Up @@ -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) {
Expand Down

0 comments on commit 06c54b9

Please sign in to comment.