XWiki Platform
  1. XWiki Platform
  2. XWIKI-5630

Issues with {{id}} when copy/pasting from .DOC files in the WYSIWYG editor

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.5
    • Fix Version/s: None
    • Component/s: Office, WYSIWYG Editor
    • Labels:
      None
    • Difficulty:
      Unknown
    • Similar issues:
      XWIKI-3909Copy pasting from simple text editor does not create paragraphs
      XWIKI-996Tables copy/pasted from Excel should be converted to wiki syntax
      XWIKI-2422Curly Quote coming from a Copy Paste is transformed into ? after cache is reset
      XWIKI-314Copy/Paste from word transfers strange caracters and codes
      XWIKI-5185Exception when saving page in which the option Import> Office Content (Copy/Paste) is used
      XWIKI-5186Exception when saving page in which the option Import> Office Content (Copy/Paste) is used
      XWIKI-2998Copy/Paste problem for styled text
      XWIKI-4967Impossible to import office (copy/paste) with style using IE7
      XWIKI-3556WYSIWYG Editor causing spurious issues with text - including deletion of random chunks
      XWIKI-1152Wysiwyg loosing content when copy pasting and switching to list

      Description

      When copy/pasting from .DOC files in the paste from Word dialog box, it often happens that the following syntax gets produced:

      = {{id name="HReleaseNotesforXWikiEnterprise19Milesto"}}           Release Notes for XWiki Enterprise 1.9 Milestone 2 =
      
      Second milestone of the XWiki Enterprise 1.9 version
      

      This breaks page rendering, resulting in blank spots instead of actual content getting rendered.

      When importing documents, the id macro should be filtered out of titles.

        Issue Links

          Activity

          Hide
          Thomas Mortagne added a comment -

          I can see two bugs here:

          • there should not be any id macro since it's totally useles
          • the id macro is wrongly serialized, it misses a / before }}
          Show
          Thomas Mortagne added a comment - I can see two bugs here: there should not be any id macro since it's totally useles the id macro is wrongly serialized, it misses a / before }}
          Hide
          Marius Dumitru Florea added a comment -

          I can easily write a cleaning filter that removes the anchors but it may break some links within the document. Also, it might not be possible to distinguish between anchors added by the user explicitly and anchors automatically generated by Word. Even if we don't find links inside the document that point to an anchor there might be inter-word-document links (although they are probably broken during office import).

          Show
          Marius Dumitru Florea added a comment - I can easily write a cleaning filter that removes the anchors but it may break some links within the document. Also, it might not be possible to distinguish between anchors added by the user explicitly and anchors automatically generated by Word. Even if we don't find links inside the document that point to an anchor there might be inter-word-document links (although they are probably broken during office import).
          Hide
          Guillaume Lerouge added a comment -

          I was at a customer yesterday. We tried importing content from Word to the wiki. The presence of the id anchor somehow provoked content to disappear from the page after the location of the macro. When copy/pasting, I think we can assume anchors are not wanted by the user.

          The case of inter-word-files-links isn't really relevant, it's not a supported feature of XWiki anyway.

          Please please please filter the id out

          Show
          Guillaume Lerouge added a comment - I was at a customer yesterday. We tried importing content from Word to the wiki. The presence of the id anchor somehow provoked content to disappear from the page after the location of the macro. When copy/pasting, I think we can assume anchors are not wanted by the user. The case of inter-word-files-links isn't really relevant, it's not a supported feature of XWiki anyway. Please please please filter the id out

            People

            • Assignee:
              Marius Dumitru Florea
              Reporter:
              Guillaume Lerouge
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Date of First Response: