No Code Attached Yet J4 Issue bug
avatar ryandemmer
ryandemmer
11 Nov 2022

Steps to reproduce the issue

  1. In System -> Global Configuration -> Site, set Default Editor to Editor - None.
  2. In System -> Global Configuration -> Text Filters, set Filter Type for the Super Users group to Default Forbidden List.
  3. Click Content -> Articles -> New to create a new article.
  4. Paste in the content below. Note the (valid) special character in the href attribute value.
<a href="https://www.ikea.com/gb/en/p/birkelånga-tray-patterned-multicolour-grey-green-40537947" target="_blank">BIRKELÅNGA</a>
  1. Click Save

Expected result

The article content should remain intact as the HTML is valid.

Actual result

The content becomes

a href="https://www.ikea.com/gb/en/p/birkelånga-tray-patterned-multicolour-grey-green-40537947&quot;&quot;"BIRKELÅNGA</a>

once filtered and saved. The first < and > from the <a> tag are removed and the last " of the attribute value is encoded.

System information (as much as possible)

Joomla 4.2.4
Browser (Any)
PHP 8.0.14

Additional comments

When the Text Filter Filter Type is set to No Filtering, this issue does not occur, and the content is saved correctly.

avatar ryandemmer ryandemmer - open - 11 Nov 2022
avatar joomla-cms-bot joomla-cms-bot - change - 11 Nov 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 11 Nov 2022
avatar ryandemmer
ryandemmer - comment - 11 Nov 2022

This appears to only occur when the special characters are in the href attribute value. For example, the following link, where the special caharacters are in the title attribute value, the Text Filter does not affect the HTML:

<a href="https://www.ikea.com/gb/en/p/birkelanga-tray-patterned-multicolour-grey-green-40537947" title="BIRKELÅNGA">BIRKELÅNGA</a>

Further investigation shows that when a special character is in the src attribute value of an <img> tag for example, a FatalError Error: Maximum execution time of 30 seconds exceeded is generated with reference to libraries/vendor/joomla/string/src/phputf8/mbstring/core.php on line 94

avatar MacJoom
MacJoom - comment - 14 Nov 2022

I can confirm this, only with my system the <img> tag is mangled as well, no Fatal Error, and strange enough <img gets ig

avatar MacJoom MacJoom - change - 14 Nov 2022
Labels Added: J4 Issue bug
avatar MacJoom MacJoom - labeled - 14 Nov 2022
avatar MacJoom MacJoom - labeled - 14 Nov 2022
avatar SharkyKZ
SharkyKZ - comment - 18 Nov 2022
avatar ryandemmer
ryandemmer - comment - 18 Nov 2022

This appears to be fixed in this PR - joomla-framework/filter#50

avatar MacJoom
MacJoom - comment - 18 Nov 2022

Yes i have successfully tested joomla-framework/filter/pull/50 - closing this issue then

avatar MacJoom MacJoom - change - 18 Nov 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-11-18 13:51:16
Closed_By MacJoom
avatar MacJoom MacJoom - close - 18 Nov 2022
avatar deltapapa01
deltapapa01 - comment - 23 Apr 2023

Hi,
Bug is still there: #39515

Add a Comment

Login with GitHub to post a comment