google / react-schemaorg

Type-checked Schema.org JSON-LD for React
Apache License 2.0
481 stars 19 forks source link

Escaped characters prevent inclusion of links in FAQ text #46

Closed jrood closed 1 year ago

jrood commented 1 year ago

According to the FAQ schema doc, the text for an acceptedAnswer should be able to include link elements. However, the replacer here escapes angle brackets and double quotes, which should not be escaped if an anchor tag is intended.

Eyas commented 1 year ago

I believe this is by design: https://www.w3.org/TR/json-ld11/#restrictions-for-contents-of-json-ld-script-elements

Google's parser should be able to unescape those; JSON-LD inside of a <script> tag is by default expected to have some characters escaped.

jrood commented 1 year ago

Google's parser should be able to unescape those

Ah, looks like it does! In that case, I'll close this out.