Visual inline diff view strips out HTML5 elements

Created on 5 August 2021, about 3 years ago
Updated 8 September 2024, about 1 month ago

Problem/Motivation

Comparing revisions using the visual inline diff layout, strips out HTML5 (such as <section> <article> ....etc). These elements are replaced by <div> and <span> tags and as a result the page loses styles.

Proposed resolution

The HTMLPurifier itself is stripping out these elements. Perhaps the diff module could add a feature to allow for HTML5 Definitions for the HTML Purifier. These definitions are available: https://github.com/xemlock/htmlpurifier-html5

For the patch to work or to test, you will need to install https://github.com/xemlock/htmlpurifier-html5
composer require xemlock/htmlpurifier-html5

Feature request
Status

Needs work

Version

1.0

Component

Diff builder plugins

Created by

🇬🇧United Kingdom adstokoe

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

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