PluginProbe
Yatra – Travel Booking & Tour Operator Software / 3.0.16
Yatra – Travel Booking & Tour Operator Software v3.0.16
3.0.16 3.0.15 3.0.14 3.0.14.1 3.0.14.2 3.0.12 3.0.13 3.0.11 3.0.10 3.0.9 3.0.8 3.0.7 3.0.6 3.0.5 3.0.5.1 3.0.4 3.0.3 3.0.2.9 3.0.2.7 3.0.2.8 3.0.2.6 trunk 1.0.0 2.0.0 2.0.1 All 84 releases
← All changes | resources/js/lib/slug.ts +7 -2 3.0.2.8 → 3.0.16 View file →
@@ -18,10 +18,15 @@
18 18 .toLowerCase()
19 19 .trim()
20 20 // Replace spaces and underscores with hyphens
21 21 .replace(/[\s_]+/g, "-")
22 - // Remove all non-word characters except hyphens
23 - .replace(/[^\w-]+/g, "")
22 + // Remove all non-word characters except hyphens. The Unicode property
23 + // escapes (\p{L} = any letter, \p{N} = any digit) with the `u` flag let
24 + // non-Latin alphabets through — Cyrillic ("Путешествие"), CJK, Devanagari,
25 + // Arabic, etc. The previous `\w` shortcut was ASCII-only and stripped
26 + // every Russian letter, producing an empty slug. WordPress's own
27 + // sanitize_title() preserves these scripts server-side, so this matches.
28 + .replace(/[^\p{L}\p{N}-]+/gu, "")
24 29 // Replace multiple consecutive hyphens with a single hyphen
25 30 .replace(/-+/g, "-")
26 31 // Remove leading and trailing hyphens
27 32 .replace(/^-+|-+$/g, "")