Obfuscation Lab / Experiment 06
Dynamic character wrapping
JavaScript turns a simple price into a forest of nested spans, with randomly generated class names. Every rebuild changes the HTML without changing the visible price.
Demo wireless headphones
Fictional product · no actual purchase available
Price
Live extraction results
The HTML structure is regenerated every time you click the button. Compare the text values with the generated markup.
textContent
innerText
span elements
Current generated HTML
What this experiment demonstrates
The original HTML contains an empty price container. JavaScript creates a separate text wrapper for every character, sometimes nesting it inside extra spans. Class names and nesting change each time, so selectors that depend on a particular child structure can break.
Important:
Character wrapping alone does not scramble text.
Once JavaScript has run, both textContent
and innerText can still return the correct
price. Later experiments will combine wrapping with
more disruptive techniques.
Accessibility note: Splitting words into many elements can make text harder to navigate or announce in some assistive technologies. This is a deliberately artificial demo, not a recommended way to present prices.