Defect #38968
closedImages not showing up when space(s) in filename
0%
Description
Hi,
i'm currently testing Redmine 5.0.5 which is an upgrade from 4.2.3
I notice that images containing spaces in the filename that we upload through CKEditor aren't displayed anymore.
Also the image selector shows the filename up until the space.
ie, an image called 'IMG_2023 Forest.png' will show up as 'IMG_2023' with then an 'image not available' cross in the thumbail for what should be the image.
How can i make it so that the spaces in the filename arent an issue anymore?
Attached is a screenshot showing how it looks in 4.2.3 (left) and 5.0.5 (right)
Files
      
      Updated by Eric Brun about 2 years ago
      
    
    Hi,
I had same issue with CKEditor Plugin (Redminex) when I upgrade Redmine from 4 to 5.
In the CKEditor plugin you can fix it by editing the following file :
%{REDMINE_HOME}/plugins/redmine_ckeditor/rich/lib/rich/url_generator.rb
and change the escape_url method by :
def escape_url(url)
      if url.respond_to?(:escape)
        url.escape
      else
        #escaped = URI.escape(url).gsub(escape_regex){|m| "%#{m.ord.to_s(16).upcase}" }
        #CGI.escape(url).gsub("%2F", "/") <= The wrong escape
        url
      end
    end
	Hope that help,
Eric
      
      Updated by Thomas B about 2 years ago
      
    
    Hi eric,
that seems to have fixed the issue.
Thank you very much
BR,
      
      Updated by Mischa The Evil about 2 years ago
      
    
    - Affected version changed from 5.0.4 to 5.0.5
 
      
      Updated by Holger Just 9 months ago
      
    
    - Status changed from New to Closed
 - Resolution set to Invalid
 
It seems that this issue is entirely caused by the CKEditor plugin.
Unfortunately this is something we can not do anything about here. Please contact the authors / maintainers of the plugin instead so that they may update the plugin for current Redmine compatibility.