Project

General

Profile

Actions

Bug #15305

closed

RemoveFormat destroys the HTML sometimes

Added by Ernesto Baschny about 18 years ago. Updated over 17 years ago.

Status:
Closed
Priority:
Should have
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
-
Start date:
2005-12-22
Due date:
% Done:

0%

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

Description

Due to a bug in a RegExp, sometimes applying the RemoveFormat to remove HTML- or Word-formatting you end up with non-valid HTML code.

The attached patch (rtehtmlarea-eb.diff) corrects this issues and additionally also removes cellpadding, cellspacing, frame and bgcolor attributes, which are used to style tables (I expect them to disappear if I choose to "remove formatting" so that I can style them in CSS or using classes provided by the RTE).

Try the attached HTML fragment (rtehtmlarea-removeformatbug.html) in a rtehtmlarea (paste it in "text" mode). You will see the problem "in action". Just remove format and select HTML-formatting and Word-Formatting. You end up with "<tdspan3>" tags and other bizarre things).

After applying the patch, you will get a "clean" output after using the removeformat function, as expected.
(issue imported from #M2084)


Files

rtehtmlarea-removeformatbug.html (418 Bytes) rtehtmlarea-removeformatbug.html Administrator Admin, 2005-12-22 15:49
rtehtmlarea-eb.diff (7.42 KB) rtehtmlarea-eb.diff Administrator Admin, 2005-12-22 15:49
remove-format.js.patch (1.78 KB) remove-format.js.patch Administrator Admin, 2005-12-22 20:23
Actions #1

Updated by Ernesto Baschny about 18 years ago

FYI

Actions #2

Updated by Stanislas Rolland about 18 years ago

I cannot reproduce the reported problem using the supplied test case, either with the compressed, nor with non-compressed versions of the script.

However, I noticed a problem when the toggleborders option is set.

Please try the attached patch.

The patch includes the additional attribute cleaning.

Actions #3

Updated by Stanislas Rolland about 18 years ago

Resolved in version 1.1.0.

Actions

Also available in: Atom PDF