? ? Pending

User tests: Successful: Unsuccessful:

avatar ryandemmer
ryandemmer
25 May 2018

Line 867 introduced in Joomla 3.8.8 attempts to clean up attribute names in an HTML tag by removing all symbols. This change removes the - character, which is valid in attribute names and required for data attributes, eg: data-value="1"

Pull Request for Issue #20579

Summary of Changes

This PR excludes the dash character form the symbols removed from attribute names by the input filter.

Testing Instructions

While logged in as a Super User:

In the Global Configuration, set the Default Editor to Editor - None.

In the Text Filters tab, set the Filter Type value to Default BlackList for the Super User group.

Save.

Go to Content -> Articles -> Add New Article.

Give the new article a Title, and add the following HTML, or a variation of it, to the Content field:

<p data-value="1">Some text</p>

Click the Save button.

Expected result

The article should be save with the original content added intact.

<p data-value="1">Some text</p>

Actual result

The hyphen is removed from the data attribute, resulting in

<p datavalue="1">Some text</p>

Documentation Changes Required

None.

avatar ryandemmer ryandemmer - open - 25 May 2018
avatar ryandemmer ryandemmer - change - 25 May 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 25 May 2018
Category External Library Libraries Composer Change
avatar ryandemmer ryandemmer - change - 25 May 2018
The description was changed
avatar ryandemmer ryandemmer - edited - 25 May 2018
avatar ryandemmer ryandemmer - change - 25 May 2018
The description was changed
avatar ryandemmer ryandemmer - edited - 25 May 2018
avatar mbabker
mbabker - comment - 25 May 2018

Would you mind sending a PR to https://github.com/joomla-framework/filter instead, that way the change doesn't get lost here next time a composer update is run against this repo? And if possible include a unit test case (similar to joomla-framework/filter@4bb9de8 it doesn't need to be anything special).

avatar brianteeman
brianteeman - comment - 26 May 2018

@mbabker as the pull and tests now exist in the framework repo as requested do you want to close this here

avatar mbabker
mbabker - comment - 26 May 2018

Upstream PRs merged and the new release tag committed here via 66debe9

avatar mbabker mbabker - change - 26 May 2018
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2018-05-26 15:56:14
Closed_By mbabker
Labels Added: ? ?
avatar mbabker mbabker - close - 26 May 2018
avatar brianteeman
brianteeman - comment - 26 May 2018

Thanks

Add a Comment

Login with GitHub to post a comment