Opened 10 years ago
Closed 9 years ago
#13565 closed defect (fixed)
PasteFromWord plugin for Editor doesn't work well with Office 2010
Reported by: | William Riley | Owned by: | Jared Jurkiewicz |
---|---|---|---|
Priority: | high | Milestone: | 1.8 |
Component: | Editor | Version: | 1.6.1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
In Office 2010, when pasting rich content, Word likes to put in <o:p> tags, like this:
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif"; color:#0D0D0D;mso-themecolor:text1;mso-themetint:242"><o:p> </o:p></span></p>
The current set of filters doesn't account for this. The issue is more visible in Chrome than Firefox (Firefox converts it to just a straight <p> tag iirc, chrome preserves it), but present in both. I can't speak for IE, but I've noticed that in IE, the editor adds <br> tags for some odd reason (probably unrelated).
I find that adding a filter at the top of _filters that strips out <o:p> tags works, but it may not be the best solution:
{ regexp: /<(\/?)o\:p[^>]*>/gi, handler: "" }
From the cases I've run into, I haven't seen <o:p> contain any content, but further testing may be needed.
Attachments (1)
Change History (7)
comment:1 Changed 10 years ago by
Component: | Dijit - Form → Editor |
---|---|
Owner: | Douglas Hays deleted |
comment:2 Changed 9 years ago by
Owner: | set to Jared Jurkiewicz |
---|
Changed 9 years ago by
Attachment: | 13565.patch added |
---|
comment:3 Changed 9 years ago by
The suggested filter seems to work good from some testing. Waiting until after 1.7 finishes RC before committing.
comment:4 Changed 9 years ago by
Milestone: | tbd → 1.8 |
---|
comment:5 Changed 9 years ago by
Status: | new → assigned |
---|
Patch to include o:p stripper logic.