Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-3994

Office importer doesn't filter the meta and title tags from the pasted text

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 2.0 M2
    • 1.8.4, 1.9
    • WYSIWYG Editor
    • None
    • any
    • office importer paste
    • Unknown

    Description

      Follow this steps to reproduce:

      • copy some plain text from OpenOffice Writer (I used 3.0.1) and paste it into the WYSIWYG Office Importer dialog
      • inspect with Firebug the pasted content, before clicking "Import"; I got:
        <meta http-equiv="CONTENT-TYPE" content="text/html; charset=utf-8">
        <title></title>
        <meta name="GENERATOR" content="OpenOffice.org 3.0  (Unix)">
        <style type="text/css">
        <!--
        	@page { margin: 0.79in }
        	P { margin-bottom: 0.08in }
        -->
        </style>
        <p style="margin-bottom: 0in;">abc</p>
        
      • click "Import" and inspect with Firebug the result; I got:
        <meta content="text/html; charset=utf-8" http-equiv="CONTENT-TYPE">
        <title></title>
        <meta content="OpenOffice.org 3.0  (Unix)" name="GENERATOR">
        <p style="margin-bottom: 0in;">abc</p>
        

      As you can see the style tag has been filtered but not the meta and title. Also, I removed a lot of white space to keep the example clear. I think this white space should be removed by the importer through cleaning. I've seen cases where the browser behaves strangely in edit mode around text nodes like "\n\n\n\n".

      Attachments

        Activity

          People

            asiri Asiri Rathnayake
            mflorea Marius Dumitru Florea
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: