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

Erroneous html cleaning in officeimporter when cleaning image tags having relative paths

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 2.2.4, 2.3 M2
    • 2.2.3, 2.3 M1
    • None
    • None
    • Unit
    • Unknown

    Description

      Currently ImageFilter uses following code:

      // OpenOffice 3.2 server generates relative image paths, extract image name.
      int separator = src.lastIndexOf(File.separator);
      if (-1 != separator) {
        src = src.substring(separator + 1);
      }
      

      Here the use of File.separator is wrong because url paths always use the character "/" which is platform independent. This code will fail to clean relative paths if executed on a windows environment.

      Attachments

        Activity

          People

            asiri Asiri Rathnayake
            asiri Asiri Rathnayake
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: