Project

General

Profile

Actions

Defect #38968

closed

Images not showing up when space(s) in filename

Added by Thomas B over 1 year ago. Updated 22 days ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Files
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

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

old-vs-new_redmine.png (65.8 KB) old-vs-new_redmine.png Thomas B, 2023-08-21 15:49
Actions #1

Updated by Eric Brun over 1 year 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

Actions #2

Updated by Thomas B over 1 year ago

Hi eric,

that seems to have fixed the issue.

Thank you very much

BR,

Actions #3

Updated by Mischa The Evil over 1 year ago

  • Affected version changed from 5.0.4 to 5.0.5
Actions #4

Updated by BeWog D 23 days ago

I'm using Redmine-5.1.6 with Redmine CKEditor plugin 1.2.4 and the bug is still here.

It works with this correction.

Regards

Actions #5

Updated by Holger Just 22 days 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.

Actions

Also available in: Atom PDF