Project

General

Profile

Actions

Bug #22871

closed

Handling of <span> tags and span.rmTagIfNoAttrib = 1

Added by Graham Knight over 14 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2010-06-12
Due date:
% Done:

100%

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

Description

I am using TYPO3 4.2.12 with rtehtmlarea 1.7.14.

I have this in my Page TSConfig:

  1. Clear everything to start with
    RTE.classes >
    RTE.default >

RTE.default { # Specify the buttons to be used and their layout
showButtons := addToList(chMode)

proc {      
overruleMode = ts_css
allowTags = span
entryHTMLparser_db = 1
entryHTMLparser_db { ## TAGS ALLOWED
allowTags < RTE.default.proc.allowTags
tags {
span.rmTagIfNoAttrib = 1
}
}
}
}

In text mode in the RTE I enter:

<p><span class="foo">Hi there</span></p>

and save it. This works fine - no changes. However, if I enter:

<p><span>Hi there</span></p>

and save it then in Firefox 3.6.3 everything appears fine but in IE 8.0 I get:

<p>Hi there</span></p>

In fact, if I save with Firefox and then read back with IE I get the same effect. So it looks to me that the same error occurs for each browser when saving to the database but that Firefox cleans things up on the way back.

Stanislas advised:

Use:
allowTags = span, p

However, there is a problem in the html parser as the result in the
database is

Hi there</span>

Please report the issue in the bugtracker.

Using
...
tags {
span.rmTagIfNoAttrib = 1
span.nesting = 1
}

will work around the issue.

This worked for me!
(issue imported from #M14710)


Related issues 1 (0 open1 closed)

Is duplicate of TYPO3 Core - Bug #50144: HTMLParser does not remove end tag when applying rmTagIfNoAttribClosedStanislas Rolland2013-07-18

Actions
Actions #1

Updated by Alexander Opitz over 11 years ago

  • Status changed from New to Needs Feedback
  • Target version deleted (0)
  • TYPO3 Version set to 4.2

The issue is very old, does this issue exists in newer versions of TYPO3 CMS (4.5 or 6.1)?

Actions #2

Updated by Gerrit Code Review over 11 years ago

  • Status changed from Needs Feedback 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 #3

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 #4

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 #5

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 #6

Updated by Stanislas Rolland almost 10 years ago

  • Status changed from Under Review to Closed
  • Is Regression set to No

Closing as duplicate.

Actions #7

Updated by Gerrit Code Review over 9 years ago

  • Status changed from Closed to Under Review

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 #8

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 #9

Updated by Alexander Stehlik over 9 years ago

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

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 #11

Updated by Alexander Stehlik over 9 years ago

  • Status changed from Under Review to Resolved
Actions #12

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF