template variables with spaces are not replaced correctly fixed #129
This commit is contained in:
parent
ab7d603171
commit
78f69d5236
4
NEWS.md
4
NEWS.md
@ -12,6 +12,10 @@ Enhancements:
|
|||||||
|
|
||||||
* Allow specifying fixed sqlapi host address (#117)
|
* Allow specifying fixed sqlapi host address (#117)
|
||||||
|
|
||||||
|
Bug fixes:
|
||||||
|
* Template variables with spaces are not replaced correctly (#129)
|
||||||
|
|
||||||
|
|
||||||
1.6.3 -- 2014-01-30
|
1.6.3 -- 2014-01-30
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
|
@ -534,7 +534,7 @@ o._replaceVars = function(str, params) {
|
|||||||
if ( ! params._re ) {
|
if ( ! params._re ) {
|
||||||
params._re = {};
|
params._re = {};
|
||||||
for (var k in params) {
|
for (var k in params) {
|
||||||
params._re[k] = RegExp("<%= " + k + " %>", "g");
|
params._re[k] = RegExp("<%=\\s*" + k + "\\s*%>", "g");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (var k in params) str = str.replace(params._re[k], params[k]);
|
for (var k in params) str = str.replace(params._re[k], params[k]);
|
||||||
|
Loading…
Reference in New Issue
Block a user