aboutsummaryrefslogtreecommitdiffstats
path: root/config/webpack/utils
diff options
context:
space:
mode:
authorArpit Chakladar <54011232+arpitchakladar@users.noreply.github.com>2023-04-06 08:56:56 +0530
committerArpit Chakladar <54011232+arpitchakladar@users.noreply.github.com>2023-04-06 08:58:32 +0530
commitd26988f5bbd147ef230676446e687eb527a7d7ad (patch)
tree99f9437c6787c48b5a539f845e1b15c50cd3b0ce /config/webpack/utils
parent975891246c3ab61e48b1c74fc88e1fd8f25600f1 (diff)
downloadbanglar-bhumi-utils-d26988f5bbd147ef230676446e687eb527a7d7ad.tar.gz
banglar-bhumi-utils-d26988f5bbd147ef230676446e687eb527a7d7ad.zip
Added "Download PDF" button to khatian information.
Diffstat (limited to 'config/webpack/utils')
-rw-r--r--config/webpack/utils/get-injection-code.js11
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"