diff options
| author | Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> | 2023-04-06 08:56:56 +0530 |
|---|---|---|
| committer | Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> | 2023-04-06 08:58:32 +0530 |
| commit | d26988f5bbd147ef230676446e687eb527a7d7ad (patch) | |
| tree | 99f9437c6787c48b5a539f845e1b15c50cd3b0ce /config/webpack/utils/get-injection-code.js | |
| parent | 975891246c3ab61e48b1c74fc88e1fd8f25600f1 (diff) | |
| download | banglar-bhumi-utils-d26988f5bbd147ef230676446e687eb527a7d7ad.tar.gz banglar-bhumi-utils-d26988f5bbd147ef230676446e687eb527a7d7ad.zip | |
Added "Download PDF" button to khatian information.
Diffstat (limited to 'config/webpack/utils/get-injection-code.js')
| -rw-r--r-- | config/webpack/utils/get-injection-code.js | 11 |
1 files changed, 4 insertions, 7 deletions
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" |
