Skip to content

Commit

Permalink
debugPro: escape guillement
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugueprime committed Nov 9, 2022
1 parent 6330293 commit e9ef618
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions content/debugPro.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function parseTest(s, login) {
result = ""
for (let i = 0; i < s.length; i++) {
if (s[i][0] == '$' && s[i][1] == ' ') {
result += "echo \"" + s[i] + "\" && " + s[i].substring(2) + " && ";
result += "echo \"" + s[i].replaceAll("'", "\\'").replaceAll('"', '\\"') + "\" && " + s[i].substring(2) + " && ";
}
}
return result.substring(0, result.length - 3);
Expand All @@ -92,7 +92,7 @@ function parseAuthor(s, login) {
let name = login.split(".");
name[0] = capitalizeFLetter(name[0]);
name[1] = capitalizeFLetter(name[1]);

s = s.replaceAll("First Name", name[0]);
s = s.replaceAll("John", name[0]);

Expand Down

0 comments on commit e9ef618

Please sign in to comment.