(json)
| 74 | * @returns {object} The same JSON with decoded entities in text nodes |
| 75 | */ |
| 76 | export function unescapeXmlEntities(json) { |
| 77 | if (json.text) { |
| 78 | json.text = unescapeXmlTags(json.text) |
| 79 | } |
| 80 | if (json.content) { |
| 81 | json.content.forEach(unescapeXmlEntities) |
| 82 | } |
| 83 | return json |
| 84 | } |
| 85 | |
| 86 | /** |
| 87 | * Unescape all entity-escaped XML/HTML tags after markdown serialization. |