Skip to content

react-schemaorg v1.0.1

Choose a tag to compare

@Eyas Eyas released this 17 Mar 15:17
d53cf25
  • Fixes XSS vulnerability (Issue #9 PR #10)
  • As a result, a safe JSON-LD parsing technique in accordance with the JSON-LD standard is used, which escapes characters like &, <, >, ", and ' into their corresponding HTML entities.

Behavioral changes

  • Certain characters will be escaped within the JSON-LD into their corresponding HTML entities.
    • Notes:
      • This should be a no-op in most cases as the Structured Data Testing Tool (and other <script type="application/ld+json"> parsers will unescape these)
      • If you're embedding HTML content somewhere in your JSON-LD, rely on this script to escape it, so as to avoid escaping it more than once. (HTML entity escaping is not idempotent)
      • SDTT will actually double unescape content, so you'll only start seeing your data mis-parsed if it was already double escaped and is now being triple escaped.