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

Can not save images with WYSIWYG editor if more than two 2 spaces are present page name

    XMLWordPrintable

Details

    • Low

    Description

      This issue is the same as XWIKI-2583 in the case there is more than one space in the name of the page or the space.

      To reproduce it :

      • create a new page with the name "My favorite pages" that has 2 spaces in its name
      • edit this page with the wysiwyg editor to add a photo
      • when you save, the photo has disappeared from the page.

      I have found a correction to this by analyzing the correction of the JIRA 2583.
      Here it is :
      In attachment.js, replace the line :

      var imgname_reg = new RegExp(this.getImagePath().replace('+', '\\+') + "(.*)", "i");

      by the following line :

      var imgname_reg = new RegExp(this.getImagePath().replace(/\+/g, '\\+') + "(.*)", "i");

      Attachments

        Issue Links

          Activity

            People

              sdumitriu Sergiu Dumitriu
              cnico Nicolas Cazottes
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: