Project

General

Profile

Actions

Bug #50144

closed

HTMLParser does not remove end tag when applying rmTagIfNoAttrib

Added by Robert Vock over 11 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
-
Start date:
2013-07-18
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.0
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

When I enter the following HTML in the html-mode of the RTE with a default configuration, the opening span is removed, but the closing span will stay as-is:

<table><tbody><tr><td><p><b><span>Test</span></b></p></td></tr></tbody></table>

This will save the following HTML to the database:

<table><tbody><tr><td><p><b>Test</span></b></p></td></tr></tbody></table>

Disabling rmTagIfNoAttrib for spans is a workaround, but this will leave all empty spans in the HTML code instead of cleaning them out:

RTE.default.proc.entryHTMLparser_db.tags.span.rmTagIfNoAttrib = 0

As a side note:
When editing a text content element with this incorrect HTML in IE8, the situation gets worse with every time I hit save (or just toggle between modes):

<table><tbody><tr><td><p><b>Test</span><//span></ span=""><//></ span=""><//></><//></b></p></td></tr></tbody></table>

Every click on the <> to toggle between wysiwyg and text-mode will add more junk code.


Related issues 3 (1 open2 closed)

Related to TYPO3 Core - Bug #95392: HTMLparser don't remove closing tagNew2021-09-28

Actions
Has duplicate TYPO3 Core - Bug #22871: Handling of <span> tags and span.rmTagIfNoAttrib = 1Closed2010-06-12

Actions
Has duplicate TYPO3 Core - Bug #45084: Strange <//span> tag when copying from ms word documentClosed2013-02-01

Actions
Actions #1

Updated by Philipp Gampe over 11 years ago

  • Assignee set to Stanislas Rolland

@Stanislas please have a look

Actions #2

Updated by Philipp Gampe over 11 years ago

  • Category set to RTE (rtehtmlarea + ckeditor)
Actions #3

Updated by Stanislas Rolland over 11 years ago

  • Status changed from New to Accepted

This is a very nasty bug of the html parser. When all attributes are removed, the parser removes the opening tag, but it has no way to match the corresponding closing tag.

Most browser will ignore the superfluous closing tag, except IE, of course.

Actions #4

Updated by Stanislas Rolland over 11 years ago

  • Subject changed from HTMLParser incorrectly cleans spans in tables of RTE to HTMLParser does not remove end tag when applying mTagIfNoAttrib
  • TYPO3 Version changed from 6.1 to 6.0
Actions #5

Updated by Stanislas Rolland over 11 years ago

  • Subject changed from HTMLParser does not remove end tag when applying mTagIfNoAttrib to HTMLParser does not remove end tag when applying rmTagIfNoAttrib
Actions #6

Updated by Gerrit Code Review over 11 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/22681

Actions #7

Updated by Stanislas Rolland over 11 years ago

Please test this change: https://review.typo3.org/#/c/22681/

Actions #8

Updated by Gerrit Code Review about 10 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/22681

Actions #9

Updated by Gerrit Code Review almost 10 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/22681

Actions #10

Updated by Gerrit Code Review almost 10 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/22681

Actions #11

Updated by Gerrit Code Review over 9 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/22681

Actions #12

Updated by Gerrit Code Review over 9 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/22681

Actions #13

Updated by Alexander Stehlik over 9 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #14

Updated by Gerrit Code Review over 9 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/41596

Actions #15

Updated by Alexander Stehlik over 9 years ago

  • Status changed from Under Review to Resolved
Actions #16

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions #17

Updated by Georg Ringer 5 months ago

  • Related to Bug #95392: HTMLparser don't remove closing tag added
Actions

Also available in: Atom PDF