[#SAK-13922] FCK Editor / pasting from Word 2007 causes

advertisement
[SAK-13922] FCK Editor / pasting from Word 2007 causes errors and adds
html tags Created: 08-Jul-2008 Updated: 28-Jun-2010 Resolved: 27-Feb-2009
Status:
Project:
Component/s:
Affects
Version/s:
Fix Version/s:
Closed
Sakai
Announcements, Assignments, Syllabus, WYSIWYG Widget (FCK & CK
Editor)
2.5.0, 2.5.2
2.5.7 [tentative], 2.6.0
Type:
Reporter:
Resolution:
Labels:
Remaining
Estimate:
Time Spent:
Original
Estimate:
Environment:
Bug
Aaron R Widner
Fixed
None
Not Specified
Attachments:
fck2007.patch
sakai_announcments.jpg
test1.docx
test2.docx
Issue Links:
Duplicate
is duplicated
by
Priority:
Assignee:
Votes:
Major
Joshua Ryan
1
Not Specified
Not Specified
Windows XP/Vista FF3 and FF 2.0.0.15
Office 2007
Tested on local production, local staging, and Sakai (nightly - 2.5.x on
HSQLDB - Built: 07/08/08 01:00 - Sakai sakai_2-5-x) environments
SAK14506
sakai_syllabus.jpg
Forums / FCKEditor copy-paste from
word
Closed
Previous Issue
Keys:
Description
When using the FCK editor in adding/editing announcements, creation of assignments, and creating/editing a syl
tool does not work. (Using attached test1.docx file. Also attached sample screenshots)
Adding/editing announcements and assignments
Does not matter whether the word file is saved in .doc or .docx format. After pasting in the word document in th
hitting OK the following error appears:
Alert: The HTML tag '<meta/>' is not allowed in formatted text.
The HTML tag '<meta/>' is not allowed in formatted text.
The HTML tag '<meta/>' is not allowed in formatted text.
The HTML tag '<meta/>' is not allowed in formatted text.
The HTML tag '<link/>' is not allowed in formatted text.
The HTML tag '<link/>' is not allowed in formatted text.
The HTML tag '<link/>' is not allowed in formatted text.
The HTML tag '<xml>' is not allowed in formatted text.
The HTML tag '</xml>' is not allowed in formatted text.
The HTML tag '<style>' is not allowed in formatted text.
The HTML tag '</style>' is not allowed in formatted text.
The HTML tag '<style>' is not allowed in formatted text.
The HTML tag '</style>' is not allowed in formatted text.
It also adds the following html tags as text:
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> <meta content="Word.Document" nam
content="Microsoft Word 12" name="Generator" /> <meta content="Microsoft Word 12" name="Originator" />
href="file:///C:%5CUsers%5Carwidner%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_f
List" />
<Unable to render embedded object: File (--[if gte mso 9]><) not found.[endif]-->
<link href="file:///C:%5CUsers%5Carwidner%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5C
rel="themeData" /> <link
href="file:///C:%5CUsers%5Carwidner%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_c
rel="colorSchemeMapping" />
<Unable to render embedded object: File (--[if gte mso 9]><xml> Normal 0 false false false EN-US X-NONE X
found.[endif]-->
<style type="text/css"> <!-- /* Font Definitions */ @font-face
{"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4;}
/* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal
{ mso-style-parent:""; margin:0in; margin-bottom:.0001pt; font-size:12.0pt;"Times New Roman","serif"; mso-fa
Roman";}
h1
{ mso-style-link:"Heading 1 Char"; margin:0in; margin-bottom:.0001pt; page-break-after:avoid; font-size:12.0p
Roman","serif";}
a:link, span.MsoHyperlink
{ color:blue; text-decoration:underline; text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{ color:purple; text-decoration:underline; text-underline:single;}
span.Heading1Char
{mso-style-name:"Heading 1 Char"; mso-style-link:"Heading 1"; font-weight:bold;}
.MsoChpDefault
{ font-size:10.0pt;}
@page Section1
{size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
{page:Section1;}
--> </style>
<!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable
{mso-style-name:"Table Normal"; mso-style-parent:""; font-size:10.0pt;"Times New Roman","serif";}
</style> <![endif]-->
Creating/editing a syllabus
Does not matter whether the word file is saved in .doc or .docx format. After pasting in the word document in th
hitting OK the following error appears:
Error: The HTML tag '<meta/>' is not allowed in formatted text. The HTML tag '<meta/>' is not allowed in form
tag '<meta/>' is not allowed in formatted text. The HTML tag '<meta/>' is not allowed in formatted text. The HT
allowed in formatted text. The HTML tag '<link/>' is not allowed in formatted text. The HTML tag '<link/>' is n
text. The HTML tag '<xml>' is not allowed in formatted text. The HTML tag '</xml>' is not allowed in formatte
'<style>' is not allowed in formatted text. The HTML tag '</style>' is not allowed in formatted text. The HTML
allowed in formatted text. The HTML tag '</style>' is not allowed in formatted text.
However this does not add any extra text as with the one above. Tested the same file with Office 2003 SP2 w/ C
.docx files and everything works fine.
Comments
Comment by Curt Bowen [ 14-Jul-2008 ]
The same problem exists in version 2.4.1 with microsoft word 2003. I get the following
messages:
Alert: The HTML tag '<meta/>' is not allowed in formatted text.
The HTML tag '<meta/>' is not allowed in formatted text.
The HTML tag '<meta/>' is not allowed in formatted text.
The HTML tag '<meta/>' is not allowed in formatted text.
The HTML tag '<link/>' is not allowed in formatted text.
The HTML tag '<xml>' is not allowed in formatted text.
The HTML tag '</xml>' is not allowed in formatted text.
The HTML tag '<style>' is not allowed in formatted text.
The HTML tag '</style>' is not allowed in formatted text.
The HTML tag '<style>' is not allowed in formatted text.
The HTML tag '</style>' is not allowed in formatted text.
The HTML tag '<style>' is not allowed in formatted text.
The HTML tag '</style>' is not allowed in formatted text.
Comment by John Bush [ 18-Jul-2008 ]
maybe a new version of fckeditor would address this ?
Comment by John Bush [ 18-Jul-2008 ]
indeed, http://dev.fckeditor.net/ticket/2272 , looks like its been fixed. I wonder if we could just
patch this fix in.
Comment by John Bush [ 18-Jul-2008 ]
we are trying the patch to the fckeditor, it'll take a little bit to get a word 2007 env setup to
verify, but once we do I'll post a patch here.
Comment by Peter A. Knoop [ 21-Jul-2008 ]
For Sakai 2.4, with browsers that were current at the time, some of these issues were fixed in .
Comment by Peter A. Knoop [ 21-Jul-2008 ]
John, if your patch tests out okay, can you attach it here for Josh to review and apply if
appropriate? Thanks.
Comment by Mike De Simone [ 21-Jul-2008 ]
patch file as applied from http://dev.fckeditor.net/attachment/ticket/2272/2272_2.patch
Comment by Aaron R Widner [ 23-Jul-2008 ]
Awesome, thanks for the quick work on this. Tested this in SVN-Trunk with no issues.
Comment by Michael Lockett [ 26-Aug-2008 ]
Still getting the same errors with announcement, assignment, & syllabus tool on the test server.
Comment by David Horwitz [ 12-Sep-2008 ]
merge conflict getting this into 2-5-x
— Merging r49120 into 'reference':
C reference/library/src/webapp/editor/FCKeditor/editor/dialog/fck_paste.html
dhorwitz@david-horwitz-6:~/branchManagement/sakai_2-5-x>
Comment by Angela Joyce Henry [ 26-Oct-2008 ]
Tested on sakai/trunk on HSQLDB - Built: 10/26/08 20:00 - Sakai Revision: 53781 - Server
sakai-sand.uits.iupui.edu (XP SP3, IE 7.x)
Summary Result:
Pasting Word 2007 documents in the FCK editor for Announcements, Syllabus, Assignments
tools successful. Assignments tool removes most of the formatting of the pasted text, while
Announcements and Syllabus tools preserve formatting and styles.
PROCEDURE





Copied text from text1.docx (attached) and pasted it into the FCK editor as follows:
In the Announcements tool - pasted directly into the body field, then pasted using the
"copy from Word" button (separate announcements)
In the Syllabus tool - pasted directly into the Content field, then pasted using the "Paste
from Word" button (separate syllabus items)
In the Assignments tool - pasted directly into the Assignment Instructions field
Repeated all the steps above, except that the text was copied from text2.docx (attached),
which used styles and some formatting.
RESULT
There were no errors. All formatting, styles and text were reproduced exactly in the
Announcements and Syllabus tools. The Assignments tool stripped the text of all formatting and
styles, but the content was faithfully reproduced.
Comment by Angela Joyce Henry [ 26-Oct-2008 ]
Additional Word 2007 file featuring styles, headings and formatting.
Comment by Megan May [ 10-Nov-2008 ]
closing based off of angela's comments
Comment by Derek Ramsey [ 16-Jan-2009 ]
I am seeing this still on our local instance of Oncourse[Oncourse - 2.5.r56179 - Sakai (r56179)]
as well as on the maint brance [2.5.x on HSQLDB - Built: 01/16/09 00:00 - Sakai sakai_2-5-x]
After clicking on paste from word, the txt is entered ok. When you try to post the announcement
or assignment, you are followed with an error such as the following:
Alert: The HTML tag '<meta>' is not allowed in formatted text.
The HTML tag '<meta>' is not allowed in formatted text.
The HTML tag '<meta>' is not allowed in formatted text.
The HTML tag '<meta>' is not allowed in formatted text.
The HTML tag '<link/>' is not allowed in formatted text.
Comment by Mike De Simone [ 16-Jan-2009 ]
Derek,
From the svn commit info in this ticket, it appears that revision 51982 from 9/8/08 to the
oncourse code undid the fix that was applied to the oncourse code in r51173 on 8/20/08.
I would recommend reapplying the fix, then this paste issue would be fixed in the oncourse code
branch. The code appears correct in the main 25x branch as far as I can tell.
Comment by Megan May [ 27-Feb-2009 ]
While it might not be in IU's branch, it doesn't look like the fix has been merged into 2.5.x
(there are no commits to that branch). Also, Derek points out, he can reproduce it on a generic
Sakai 2.5.x instance
As per JIRA process, I'm closing it so it displays on the list of items to be merged.
Comment by Jean-François Lévêque [ 16-Mar-2009 ]
There's still a merge conflict to get this fix into 2.5.x:
$svn merge --dry-run -r49119:49120 https://source.sakaiproject.org/svn/reference/trunk
reference/
C reference/library/src/webapp/editor/FCKeditor/editor/dialog/fck_paste.html
Comment by Steve Swinsburg [ 28-Jun-2010 ]
2.5.x, r78857 - had to manually resolve some conflicts, but tested ok.
Generated at Sun Mar 06 03:51:58 CST 2016 using JIRA 6.4.11#64026sha1:78f6ec473a3f058bd5d6c30e9319c7ab376bdb9c.
Download