Bug #4284

Paste from some word documents does not remove cruft

Submitted:
2011-04-08 06:31:14 By: solarissmoke
Browsers:
firefox msie safari chrome opera
Open Priority: 3 Resolution: None Assigned to: None
Description of problem:

With certain Word documents, using the "Paste from Word" feature doesn't strip out the cruft from the HTML.

Steps to reproduce:
1. Apply the following settings to tinymce init:

paste_remove_styles => true
paste_remove_spans => true
paste_strip_class_attributes => all
paste_text_use_dialog => true

2. Open the Word document attached to this ticket

3. Copy the contents of the document and paste using "Paste from Word"

Expected result:

The resulting HTML should contain no span tags/style attributes

Actual result:

The resulting HTML contains lots of spans and style attributes.

NOTE: This does not happen with ALL Word documents, just some. I don't know what the exact conditions are, but it happens with the document I have attached. I have tested in TinyMCE 3.3.9 as well as 3.4.2.

 

If you wish to follow or post a comment, you need to be registered and logged in.

Comments

User Image
  • 2011-06-16 16:33:01

jeiseman

I found a solution to this problem here: http://www.martinsikora.com/how-to-make-tinymce-to-output-clean-html