ztechno_core 0.0.74 → 0.0.75

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -123,7 +123,9 @@ class ZMailService {
123
123
  * @private
124
124
  */
125
125
  async inject(body, inject) {
126
- Object.keys(inject ?? {}).map((variableName) => {
126
+ // Sort variable names by length (longest first) to prevent partial matches
127
+ const sortedKeys = Object.keys(inject ?? {}).sort((a, b) => b.length - a.length);
128
+ sortedKeys.forEach((variableName) => {
127
129
  const key = `:${variableName}`;
128
130
  while (body.indexOf(key) !== -1) {
129
131
  body = body.replace(key, inject[variableName].toString());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ztechno_core",
3
- "version": "0.0.74",
3
+ "version": "0.0.75",
4
4
  "description": "Core files for ztechno framework",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",