Skip to content

Commit

Permalink
[rust] Properly escape empty triple-braces
Browse files Browse the repository at this point in the history
  • Loading branch information
jimschubert committed May 28, 2020
1 parent ff91eec commit 9a982d4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ impl Request {
let mut path = self.path;
for (k, v) in self.path_params {
// replace {id} with the value of the id path param
path = path.replace(&format!("{{{}}}", k), &v);
{{=<% %>=}}path = path.replace(&format!("{{{}}}", k), &v);<%={{ }}=%>
}

for (k, v) in self.header_params {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ impl Request {
let mut path = self.path;
for (k, v) in self.path_params {
// replace {id} with the value of the id path param
path = path.replace(&format!("", k), &v);
path = path.replace(&format!("{{{}}}", k), &v);
}

for (k, v) in self.header_params {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ impl Request {
let mut path = self.path;
for (k, v) in self.path_params {
// replace {id} with the value of the id path param
path = path.replace(&format!("", k), &v);
path = path.replace(&format!("{{{}}}", k), &v);
}

for (k, v) in self.header_params {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ impl Request {
let mut path = self.path;
for (k, v) in self.path_params {
// replace {id} with the value of the id path param
path = path.replace(&format!("", k), &v);
path = path.replace(&format!("{{{}}}", k), &v);
}

for (k, v) in self.header_params {
Expand Down

0 comments on commit 9a982d4

Please sign in to comment.