@onlineapps/cookbook-template-helpers 1.0.3 → 1.0.4
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.
package/package.json
CHANGED
|
@@ -19,7 +19,9 @@ function normalizeString(value) {
|
|
|
19
19
|
// Allow common Latin ranges (including diacritics), numbers, whitespace and basic punctuation
|
|
20
20
|
const cleaned = str.replace(/[^\x20-\x7E\u00A0-\u024F\u1E00-\u1EFF\s\.\,\!\?\;\:\-\_]/g, '');
|
|
21
21
|
// Explicitly drop angle brackets to avoid HTML/script injection noise
|
|
22
|
-
|
|
22
|
+
const noAngles = cleaned.replace(/[<>]/g, '');
|
|
23
|
+
// Collapse repeated whitespace to a single space and trim edges
|
|
24
|
+
return noAngles.replace(/\s+/g, ' ').trim();
|
|
23
25
|
}
|
|
24
26
|
|
|
25
27
|
/**
|