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

Updated by Gerrit Code Review over 10 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 https://review.typo3.org/30223

Actions #2

Updated by Stanislas Rolland over 10 years ago

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

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF