← back to Ffepurchasing
frontend: cleanSku() strips vendor names from displayed sku (.ven/list/detail) + defer renderRailSections call (fix ReferenceError) — click-through verified
14c3805d601855d85d11c5378fda69f37c7f3b49 · 2026-05-26 15:25:18 -0700 · Steve
Files touched
Diff
commit 14c3805d601855d85d11c5378fda69f37c7f3b49
Author: Steve <steve@designerwallcoverings.com>
Date: Tue May 26 15:25:18 2026 -0700
frontend: cleanSku() strips vendor names from displayed sku (.ven/list/detail) + defer renderRailSections call (fix ReferenceError) — click-through verified
---
public/index.html | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/public/index.html b/public/index.html
index 81e1220..6486f03 100644
--- a/public/index.html
+++ b/public/index.html
@@ -625,6 +625,10 @@ const TOUCH = window.matchMedia('(hover: none)').matches;
const LABELS = {"all":"All","textured":"Textured & Tactile","beige":"Warm Neutrals","contemporary":"Modern & Contemporary","gray":"Cool Grays","traditional":"Classic & Traditional","white":"Whites & Ivories"};
function escAttr(s) { return String(s == null ? '' : s).replace(/[&<>"']/g, c => ({ '&':'&','<':'<','>':'>','"':'"',"'":''' }[c])); }
+function cleanSku(s){
+ var V=/(?:^|-)(versace|kravet|fentucci|sandberg|harlequin|blithfield|westport|thibaut|koroseal|schumacher|scalamandre|fromental|dedar|carnegie|marburg|fabricut|coordonne|nina-campbell|lee-jofa(?:-modern)?|clarke(?:-and)?-clarke|clarke|brunschwig(?:-and)?(?:-fils)?|designers-guild|graham-(?:and-)?brown|andrew-martin|candice-olson|ronald-redding|jeffrey-stevens|sister-parish|arte-international|wolf-gordon|phillip-jeffries|cole-(?:and-)?son|maya-romanoff|g-p-j-baker|les-ensembliers|breegan(?:-jane)?)(?:-\\d+)?(?=-|$)/gi;
+ return String(s||'').replace(V,'').replace(/--+/g,'-').replace(/^-+|-+$/g,'');
+}
// Image-URL allowlist: only DW Shopify CDN + designerwallcoverings.com (defends against XSS via crafted products.json)
function safeImg(u) { return /^https:\/\/(?:cdn\.shopify\.com|designerwallcoverings\.com)\//.test(u || '') ? u : '/hero-bg.jpg'; }
// Trade-spec helpers — derive MOQ / width / repeat / NET30 trade $ from product fields when available,
← 9ea9991 sku-redact: wire shared vendor-id display scrubber
·
back to Ffepurchasing
·
scrub vendor name leaks from products.json source (224 produ 8a7bd96 →