Project

General

Profile

Actions

Defect #19791

open

If user using customized theme with special characters in folder name, the generated stylesheet's URL won't be valid

Added by Jethro Yu over 9 years ago. Updated over 9 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Themes
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

Description

I report this because the special case can cause error in my plugin, redmine_issue_reminder

Overview Description:

If user use folder named "circle space" in redmine for customized theme, the generated page can use:

    <link href="/themes/circle%20space/stylesheets/application.css" media="all" rel="stylesheet" type="text/css">

But not:

    <link href="/themes/circle space/stylesheets/application.css" media="all" rel="stylesheet" type="text/css">

href syntax : is it okay to have space in file name?

HTML: href syntax : is it okay to have space in file name - Stack Overflow

If user using customized theme with special characters in folder name, the generated stylesheet's URL is not valid

The href attribute should contain a valid URL1. Since space characters are not allowed2 in URLs, you have to encode them3.

The Patch

The patch only escapes String but not Symbol, so it may be not a full solution.

logs

sh: 1: svn: not found
sh: 1: darcs: not found
sh: 1: cvs: not found
sh: 1: bzr: not found
Environment:
  Redmine version                2.6.3.stable
  Ruby version                   2.0.0-p598 (2014-11-13) [x86_64-linux]
  Rails version                  3.2.21
  Environment                    production
  Database adapter               Mysql2
SCM:
  Mercurial                      2.8.2
  Git                            1.9.1
  Filesystem
Redmine plugins:
  clipboard_image_paste          1.9
  progressive_projects_list      1.0.0
  redmine_bootstrap_kit          0.1
  redmine_didyoumean             1.2.0
  redmine_graphs                 0.1.0
  redmine_image_clipboard_paste  1.0.0
  redmine_issue_reminder         3.0.0
  redmine_issue_templates        0.1.0
  redmine_keyboard_shortcuts     0.0.1
  redmine_lightbox               0.0.8
  redmine_stealth                0.6.0
  redmine_zenedit                0.0.2
  scrum                          0.9.1
  sidebar_hide                   0.0.7

1 http://en.wikipedia.org/wiki/URL#Syntax

2 http://stackoverflow.com/questions/497908/are-urls-allowed-to-have-a-space-in-them

3 http://www.w3schools.com/TAGS/ref_urlencode.asp


Files

Actions

Also available in: Atom PDF