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: Trivial Trivial
    • Resolution: Unresolved
    • Affects Version/s: 2.5
    • Fix Version/s: None
    • Component/s: Office, WYSIWYG Editor
    • Labels:
      None
    • Development Priority:
      Low
    • Difficulty:
      Medium
    • Similar issues:

      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
          Hide
          Marius Dumitru Florea added a comment -

          The ID macro is still being generated on XWiki 9.9 with CKEditor when pasting the content from the attached office document, but it doesn't cause any problems. It's not visible in view mode and in edit mode you get a macro placeholder that allows you to delete the ID macro. I'm lowering the priority of the issue.

          Show
          Marius Dumitru Florea added a comment - The ID macro is still being generated on XWiki 9.9 with CKEditor when pasting the content from the attached office document, but it doesn't cause any problems. It's not visible in view mode and in edit mode you get a macro placeholder that allows you to delete the ID macro. I'm lowering the priority of the issue.

            People

            • Assignee:
              Unassigned
              Reporter:
              Guillaume Lerouge
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Date of First Response: