From d26988f5bbd147ef230676446e687eb527a7d7ad Mon Sep 17 00:00:00 2001 From: Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> Date: Thu, 6 Apr 2023 08:56:56 +0530 Subject: Added "Download PDF" button to khatian information. --- config/webpack/utils/get-injection-code.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'config/webpack/utils') diff --git a/config/webpack/utils/get-injection-code.js b/config/webpack/utils/get-injection-code.js index 6333a6a..ec969c1 100644 --- a/config/webpack/utils/get-injection-code.js +++ b/config/webpack/utils/get-injection-code.js @@ -1,11 +1,8 @@ module.exports.getInjectionCode = (code, front) => { - const escapeSequences = ["b", "f", "n", "r", "t", "v"]; - let finalCode = code.replaceAll("`","\\`"); - - for (const escapeSequence of escapeSequences) { - finalCode = finalCode - .replaceAll("\\" + escapeSequence, "\\\\" + escapeSequence) - } + let finalCode = code + .replaceAll("\\", "\\\\") + .replaceAll("`","\\`") + .replaceAll("${", "\\${"); const concatenationCode = front ? "t.innerHTML=i+t.innerHTML" -- cgit v1.2.3