Cut and Paste text from Word - displays extraneous characters in Firefox

Cut and Paste text from Word - displays extraneous characters in Firefox

by Susan Mangan -
Number of replies: 10
I opened up a bug in the tracker last week but haven't heard anything yet so I thought I'd post this in the general forum to see if anyone has experienced this oddity. I haven't been able to find any other reports of this behavior yet, so I'm HOPING it's not a bug at all and that the fix is a simple setting of some sort! (say that 10 times fast.. simple setting of some sort...tongueout) Here it is:

- cut and paste a line of text from a Word document (versions 2000 and 2003) into the submission of an Online Text Assignment (or) the Summary field of the Web Page resource (or) the Summary and HTML editor of the Wiki (I have only tested those activities/resources so far)

- click save
- the Word style descriptor becomes visible

This behavior only occurs when using Firefox 3.0.1, not IE 6.

I haven't been able to test on prior versions of Firefox.

Odd thing is that when using the Web Page resource, you can copy and paste the same line of text into the Summary and the HTML editor and on Save, only the Summary displays the style descriptor. The actual HTML editor seems to display fine. So, the problem doesn't appear to be linked to the editor itself.

Example style descriptor pasted below:

<!-- /* Font Definitions */ @font-face {font-family:"Trebuchet MS"; panose-1:2 11 6 3 2 2 2 2 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:7 0 0 0 19 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Trebuchet MS"; mso-fareast-font-family:"Times New Roman"; mso-bidi-font-family:"Times New Roman";} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.25in 1.0in 1.25in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} -->

http://tracker.moodle.org/browse/MDL-16621

Thanks!
Average of ratings: -
In reply to Susan Mangan

Re: Cut and Paste text from Word - displays extraneous characters in Firefox

by Ann Adamcik -
I'm seeing the same thing. We have the Word Format Filter enabled, and pressing the 'Clean Word HTML' button on the editor strips out some formatting but doesn't get all of it.

Here's a relevant discussion from a mozilla forum - http://forums.mozillazine.org/viewtopic.php?f=38&t=704435&start=0&st=0&sk=t&sd=a.

It looks like the Web Page resource does some sort of extra filtering of the html input.
In reply to Susan Mangan

Re: Cut and Paste text from Word - displays extraneous characters in Firefox

by Ann Adamcik -
Okay, playing around with settings, I found that turning on HTML Purifier seems to resolve this problem (Site Administration->Miscellaneous->Experimental).

Since it's experimental, I don't know if it will introduce other issues, but it's probably worth trying out.
In reply to Ann Adamcik

Re: Cut and Paste text from Word - displays extraneous characters in Firefox

by Susan Mangan -
hmm... I guess you must be using v.1.9 huh.  I wonder if there is something we 1.8'rs can do to solve this?  thoughtful 
In reply to Ann Adamcik

Re: Cut and Paste text from Word - displays extraneous characters in Firefox

by ben reynolds -
We're seeing this as of today. .docx users copying and pasting. I just verified that it happens when I save as .docx in Word 2007.

Using FF 3.0.3 and IE 7.0.5730+

Have you found any adverse effects from HTML purifier?

We've seen similar problems with Ms Word html qualifiers that are supposed to be commented out < ! - - [ if then stuff here] - - > without the spaces between comment tags.

Html purifier is not an option for us, as we have PPT--> flash embedded objects that need to function, and they won't if purifier is turned on.
In reply to Susan Mangan

Re: Cut and Paste text from Word - displays extraneous characters in Firefox

by marc oehlman -
Hi all... we have experienced the same issues in 1.84 and 1.92. On the Mac side, Office 2008 does not appear to give the formatting code, but strips out most formatting from a Word c/p. I too look forward to a resolution...
Marc




In reply to marc oehlman

Re: Cut and Paste text from Word - displays extraneous characters in Firefox

by Blair F. -
Picture of Particularly helpful Moodlers
Has anyone ever found the solution to this? I am experiencing this using Moodle 1.9.2 and Firefox 3.5.7. I really don't want to have to tell the users to use I.E., since we usually tell them to avoid I.E. and use FF.
In reply to Blair F.

Re: Cut and Paste text from Word - displays extraneous characters in Firefox

by Itamar Tzadok -
I don't think so. Without hacking the code you can suggest to your users to toggle HTML source (toggle) in the Moodle editor and then paste so that what goes into the editor is only plain text. If they wish to preserve styles then they can paste as usual, save, and edit for deleting the Word style definitions; or past as usual, toggle HTML source, delete the redundant style definitions and save. Moodle 2.0 should introduce integration with more advanced editors. smile
In reply to Susan Mangan

Re: Cut and Paste text from Word - displays extraneous characters in Firefox

by David Barrett -
One workaround for the problem of extraneous HTML from Word documents is to paste your text into another word processor (the free OpenOffice suite, although a largish download, is one that works; Pages for Mac users also works) and then re-copy it and paste it into your Moodle page.

I wonder whether this would work for your problem also. It's not ideal, but until someone comes up with a way to solve this problem within Moodle it might be an option for you. And it does have the additional benefit of preserving styles.

Good luck!

big grin
In reply to David Barrett

Re: Cut and Paste text from Word - displays extraneous characters in Firefox

by Itamar Tzadok -
When working with students' submissions I actually prefer that they spare me their styles as styles are rarely relevant to the content of the assignments and can reduce the efficiency and effectiveness of the review. Submission guidelines such as 'save as plain text before pasting' or 'use any editor but Word' are usually ignored. So I script those styles away. smile
In reply to Susan Mangan

Re: Cut and Paste text from Word - displays extraneous characters in Firefox

by John Roughley -
I tell my users to copy the text from MS Word to Notepad first, then copy this to the Moodle. That way you only get plain text and no extra tags.