Project

General

Profile

Actions

Bug #58310

closed

rtehtmlarea "remove format" eats too much (Patch included)

Added by Volker Burggräf over 10 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
-
Start date:
2014-04-29
Due date:
% Done:

100%

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

Description

The remove format function w/ msword selected removes too much content. This seems to affect all Versions of TYPO3 CMS 4.7 to 6.2.1!

File typo3/sysext/rtehtmlarea/htmlarea/plugins/RemoveFormat/remove-format.js, line 244-246:

// Remove unwanted tags and their contents: style, title
html = html.replace(/<style[^>]*>.*<\/style[^>]*>/gi, "").
replace(/<title[^>]*>.*<\/title[^>]*>/gi, "");

This removes too much content if more than one <style> block is found inside the content.
Patch:

// Remove unwanted tags and their contents: style, title
html = html.replace(/<style[^>]*>.*?<\/style[^>]*>/gi, "").
replace(/<title[^>]*>.*<\/title[^>]*>/gi, "");

(Added a Questionmark in the style regexp.)

Actions

Also available in: Atom PDF