Unnecessary escape character: \"
51 html: `
52<h1>One More Step</h1>
53<p>You have 24 hours to complete your registration.</p>
54<a href=\"${process.env.DEPLOYMENT_URL}/api/auth/token/${body.email}\">Sign Up</a>55<p>If this was not you, please ignore this email.</p>
56`,
57 });
Unnecessary escape character: \"
51 html: `
52<h1>One More Step</h1>
53<p>You have 24 hours to complete your registration.</p>
54<a href=\"${process.env.DEPLOYMENT_URL}/api/auth/token/${body.email}\">Sign Up</a>55<p>If this was not you, please ignore this email.</p>
56`,
57 });
Description
Escaping non-special characters in strings, template literals, and regular expressions doesn't have any effect.
Bad Practice
"\'";
'\"';
"\#";
"\e";
`\"`;
`\"${foo}\"`;
`\#{foo}`;
/\!/;
/\@/;
Recommended
"\"";
'\'';
"\x12";
"\u00a9";
"\371";
"xs\u2111";
`\``;
`\${${foo}}`;
`$\{${foo}}`;
/\/g;
/\t/g;
/\w\$\*\^\./;