One of my page headings, Your <em>IP</em>, plainly , showed up in the JSON-LD as "Your IP , plainly" . The same bug was in the structured data of 62 pages. On screen, every one of them looked right.
The site is MyIPScan, which I built. This post is about the bug class, how it happens, and a test that catches it.
TL;DR
If you derive a JSON-LD headline from heading HTML, inline tags like <em> can leave a space before punctuation: Your <em>IP</em>, plainly β Your IP , plainly .
Fix: delete inline tags without replacing them, and turn only block boundaries into spaces.
Catch it at build time: the JSON-LD headline must equal the visible heading's normalized text, and no generated text field may match / [,.;:!?)]/ .
Why one space matters
JSON-LD is a copy of your page written for machines, and no human reads it.β¦