Issue when < tag is used in text

Created on 12 February 2021, almost 4 years ago
Updated 11 July 2023, over 1 year ago

Problem motivation

In some cases you want to be able to put a '<' sign in a text (as comparison operator) that should be processed by Onomasticon.
When you do this, you will get a warning saying

Warning: DOMDocumentFragment::appendXML(): Entity: line 11: parser error : StartTag: invalid element name in Drupal\onomasticon\Plugin\Filter\FilterOnomasticon->process() (line 110 of modules/contrib/onomasticon/src/Plugin/Filter/FilterOnomasticon.php).

This is because the tag is seen as an opened xml tag that is never closed.

I have already been testing with the html_entities_normalize_xml() function but no solution yet.

Steps to reproduce

Add < symbol to a textfield that is processed by onomasticon.
When viewing the page you should see the warning pop up multiple times.

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇧🇪Belgium LRoels Ghent

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024