Bug #52470

In Chrome RTE inserts weird SPAN tags

Added by Stephan Vidar over 6 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Must have
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
Start date:
2013-10-02
Due date:
% Done:

100%

TYPO3 Version:
4.5
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

If the bulleted list is applied to simple text, HTML code looks like this:

<ul><li><span style="line-height: 1.5em;">Lorem ipsum...</span></li></ul>
The phenomenon occurs in Chrome 30 and Opera 16. These browsers use the same rendering engine. Maybe this is the reason?

TYPO3 4.5.30


Related issues

Related to TYPO3 Core - Bug #59562: WebKit may insert a span element when backspacing an heading Closed 2014-06-13
Related to TYPO3 Core - Bug #67348: RTE inserts <span class="line-height: xx"> in Chrome Closed 2015-06-08

Associated revisions

Revision 28577969 (diff)
Added by Stanislas Rolland over 5 years ago

[BUGFIX] RTE: In Chrome RTE inserts weird span tags

Remove the span tags inserted by Chrome or Opera on execution of
native execCommand. The attributes of these span tags have evolved...

Releases: master, 6.2
Resolves: #52470
Change-Id: Ibb046b86e869bd7d4afc61ab5005595467b288cd
Reviewed-on: http://review.typo3.org/33391
Reviewed-by: Stanislas Rolland <>
Tested-by: Stanislas Rolland <>

Revision d435d0ca (diff)
Added by Stanislas Rolland over 5 years ago

[BUGFIX] RTE: In Chrome RTE inserts weird span tags

Remove the span tags inserted by Chrome or Opera on execution of
native execCommand. The attributes of these span tags have evolved...

Releases: master, 6.2
Resolves: #52470
Change-Id: Ibb046b86e869bd7d4afc61ab5005595467b288cd
Reviewed-on: http://review.typo3.org/33392
Reviewed-by: Stanislas Rolland <>
Tested-by: Stanislas Rolland <>

Revision f8dab631 (diff)
Added by Stanislas Rolland over 5 years ago

[BUGFIX] RTE: In Chrome RTE inserts weird span tags

Remove the span tags inserted by Chrome or Opera on execution of native
execCommand. The attributes of these span tags have evolved...
This is a follow-up change to http://review.typo3.org/33392.

Releases: master, 6.2
Resolves: #52470
Change-Id: Ib3c2fa3a1a8f0e378bfa2ca4a5f6e78d1fdf3da7
Reviewed-on: http://review.typo3.org/33657
Reviewed-by: Mathias Brodala <>
Reviewed-by: Stanislas Rolland <>
Tested-by: Stanislas Rolland <>

Revision 8653ca5a (diff)
Added by Stanislas Rolland over 5 years ago

[BUGFIX] RTE: In Chrome RTE inserts weird span tags

Remove the span tags inserted by Chrome or Opera on execution of native
execCommand. The attributes of these span tags have evolved...
This is a follow-up change to http://review.typo3.org/33392.

Releases: master, 6.2
Resolves: #52470
Change-Id: Ib3c2fa3a1a8f0e378bfa2ca4a5f6e78d1fdf3da7
Reviewed-on: http://review.typo3.org/33658
Reviewed-by: Stanislas Rolland <>
Tested-by: Stanislas Rolland <>

Revision b65517bf (diff)
Added by Stanislas Rolland over 5 years ago

[BUGFIX] RTE wraps p tags around ol/ul in chrome and opera

This mis a follow-up to change https://review.typo3.org/#/c/33655/

Resolves: #62559
Resolves: #59559
Resolves: #52470
Releases: master, 6.2
Change-Id: I66c1ed5cf288cd8aaaac66fc12655c655ac1964c
Reviewed-on: http://review.typo3.org/33772
Reviewed-by: Stanislas Rolland <>
Tested-by: Stanislas Rolland <>

Revision df600c69 (diff)
Added by Stanislas Rolland over 5 years ago

[BUGFIX] RTE wraps p tags around ol/ul in chrome and opera

This is a follow-up to change https://review.typo3.org/#/c/33655/

Resolves: #62559
Resolves: #59559
Resolves: #52470
Releases: master, 6.2
Change-Id: I66c1ed5cf288cd8aaaac66fc12655c655ac1964c
Reviewed-on: http://review.typo3.org/33773
Reviewed-by: Stanislas Rolland <>
Tested-by: Stanislas Rolland <>

History

#1 Updated by Tobias Wollender over 6 years ago

I have a similar behaviour in Chrome and the RTE (TYPO3 6.2) when using RTE.default.contentCSS and some definitions for the body in the external file. E. g. something like this:

body {
background: #efeedf !important;
color: #333 !important;
font-family: Arial, sans-serif;
font-size: 15px !important;
}

If i copy and paste some text - from the RTE to the RTE - I get <span> tags with font-size definitions applied to the pasted text. And it also happens if I try to make normal text out of an unordered list. If I delete the body css part from the external css file, everything works fine.

#2 Updated by Sascha Löffler over 6 years ago

As a workaround add this to your pageTSConfig:

RTE.default.proc {
    entryHTMLparser_db {
        tags {
            span.fixAttrib.style.unset = 1
            span.rmTagIfNoAttrib = 1
        }
    }
}

#3 Updated by Urs Braem about 6 years ago

I can confirm this in Chrome 33, <span style="font-size:12px"></span> is added - with TYPO3 6.1

#4 Updated by Urs Braem about 6 years ago

  • Target version set to 6.2.0

As this affects 6.x too, the version might be updated

#5 Updated by Falk no-lastname-given almost 6 years ago

This issue is still present in Chrome 36 with TYPO3 6.2.4!

Chrome is a very popular browser and many of our clients using chrome so this issue should be solved.

#6 Updated by Gerrit Code Review over 5 years ago

  • Status changed from New to Under Review

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

#7 Updated by Gerrit Code Review over 5 years ago

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/33392

#8 Updated by Stanislas Rolland over 5 years ago

  • Status changed from Under Review to New

Please test this change: https://review.typo3.org/#/c/33392/ and report in which browser you tested.

While this should fix the case of the list insertion, I was not able to reproduce the problem on paste.

Please explain the type of paste operation being performed: plain text or other.

#9 Updated by Stephan Vidar over 5 years ago

I have tested this change: https://review.typo3.org/#/c/33392/ and the problem with list insertion is solved! I also could not reproduce the problem on paste.

Browser: Chrome 38 (Win)
TYPO3 6.2.5

#10 Updated by Gerrit Code Review over 5 years ago

  • Status changed from New to Under Review

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/33391

#11 Updated by Gerrit Code Review over 5 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/33391

#12 Updated by Stanislas Rolland over 5 years ago

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

#13 Updated by Stanislas Rolland over 5 years ago

  • Status changed from Resolved to New
  • Assignee set to Stanislas Rolland
  • Target version changed from 6.2.0 to next-patchlevel

#14 Updated by Stanislas Rolland over 5 years ago

Well, span elements still get inserted inside list elements, sometimes...

#15 Updated by Gerrit Code Review over 5 years ago

  • Status changed from New to Under Review

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

#16 Updated by Gerrit Code Review over 5 years ago

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/33658

#17 Updated by Stanislas Rolland over 5 years ago

  • Status changed from Under Review to Resolved

#18 Updated by Stanislas Rolland over 5 years ago

  • Status changed from Resolved to New

#19 Updated by Gerrit Code Review over 5 years ago

  • Status changed from New to Under Review

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

#20 Updated by Gerrit Code Review over 5 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/33772

#21 Updated by Stanislas Rolland over 5 years ago

  • Status changed from Under Review to Resolved

#22 Updated by Gerrit Code Review over 5 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/33773

#23 Updated by Gerrit Code Review over 5 years ago

Patch set 2 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/33773

#24 Updated by Stanislas Rolland over 5 years ago

  • Status changed from Under Review to Resolved

#25 Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF