- Issue created by @DamienMcKenna
- πΊπΈUnited States DamienMcKenna NH, USA
I'll be AFK through the weekend, will follow up on this on Monday.
- πΊπΈUnited States jrockowitz Brooklyn, NY
I think the
.<\/p>
is happening because the slash is being escaped.We might need to answer the bigger question which is what HTML should be included via JSON-LD.
- πΊπΈUnited States DamienMcKenna NH, USA
This point came up on Schema Metatag: β¨ Escape html instead of stripping html tags Needs work
Twice, in fact: #2989338: SchemaMetatagManager::encodeJsonld Should Allow for HTML β
- πΊπΈUnited States jrockowitz Brooklyn, NY
The MR uses the below flags copied from SchemaMetatagManager::encodeJsonld
JSON_UNESCAPED_SLASHES | JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT | JSON_UNESCAPED_UNICODE
The results JSON-LD inside the
<script>
tag is valid.If the exact flags that are supported become a debate, we can easily make the JSON encode flags a configurable settings at a later point.
- Merge request !88Issue #3406869: Text fields produces incorrect output if HTML present β (Merged) created by jrockowitz
- πΊπΈUnited States DamienMcKenna NH, USA
This resolves one problem - the output is at least consistent now, so that part is RTBC IMHO.
The second issue is how to determine whether the property's value should be rendered as plain text with HTML tags removed, versus escaping the tags. Do you have thoughts on whether you would prefer this handled through hooks, or whether it should be possible to handle it from the UI?
- Status changed to RTBC
7 months ago 5:01pm 11 December 2023 - πΊπΈUnited States jrockowitz Brooklyn, NY
We should absolutely support and default to allowing HTML tags.
I am open to providing a setting to strip or convert HTML tags to plain text
-
jrockowitz β
committed df080a02 on 1.0.x
Issue #3406869: JSON-LD output does not properly escape HTML tags
-
jrockowitz β
committed df080a02 on 1.0.x
- Status changed to Fixed
7 months ago 7:45pm 11 December 2023 Automatically closed - issue fixed for 2 weeks with no activity.