プロジェクト

全般

プロフィール

Vote #76342

未完了

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

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
New
優先度:
通常
担当者:
-
カテゴリ:
Themes_38
対象バージョン:
-
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
38
version_id:
0
issue_org_id:
19791
author_id:
76810
assigned_to_id:
0
comments:
1
status_id:
1
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
91
ステータス-->[New]

説明

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

h1. Overview Description:

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

    

But not:

    

h1. 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":http://stackoverflow.com/questions/4172579/html-href-syntax-is-it-okay-to-have-space-in-file-name

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 URL[1]. Since space characters are not allowed[2] in URLs, you have to encode them[3].

h1. The Patch

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

h1. 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

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

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

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


journals

* Typo about my plugin, it's http://www.redmine.org/plugins/redmine_mail_reminder
* It Turns out the patch can cause other error. *DO NOT USE THE PATCH!!*

The problem is that Premailer uses URI to parse stylesheet file path, which errors when path has white space.

I have "Monkey-Patched Premailer":https://github.com/Hopebaytech/redmine_issue_reminder/commit/5628b3a789eb1c33d6dbd4916d6ea34cdbadd40b to use addressable/uri instead of native uri and it's fine now.

"My patch for Premailer/Premailer-rails"
However the issue still exists and currently there are no proper patch for this.
--------------------------------------------------------------------------------

Admin Redmine さんが約4年前に更新

  • カテゴリThemes_38 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0