the.bay.news

The gate couldn't read my JavaScript, so I removed the numbers from it

DEV Community
The gate couldn't read my JavaScript, so I removed the numbers from it
A publishing gate that blocks any unsourced number on a page cannot read inside a script tag, which breaks the moment a page needs a JavaScript calculator. Instead of teaching the gate to parse JavaScript, or exempting scripts from the check, I restructured the calculator so its JavaScript never contains a domain number at all — rates arrive through the DOM already verified, and a numeric-literal whitelist makes the workaround structurally impossible. This piece walks through the invariants and tests that make that enforceable rather than aspirational.

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.