プロジェクト

全般

プロフィール

Vote #73963

未完了

If the text formatting is "none", Meta characters in URLs are escaped twice.

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

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

0%

予定工数:
category_id:
26
version_id:
0
issue_org_id:
14171
author_id:
41136
assigned_to_id:
0
comments:
1
status_id:
1
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
71
ステータス-->[New]

説明

If the text formatting is "none", Meta characters in URLs are escaped twice.

For example,

http://foo/bar.cgi&query=bazo

is formatted as:

http://foo/bar.cgi&query=baz

This problem is introduced by Redmine::WikiFormatting::NullFormatter#to_html (in lib/redmine/wiki_formatting.rb):


def to_html(*args)
  t = CGI::escapeHTML(@text)
  auto_link!(t)
  auto_mailto!(t)
  simple_format(t, {}, :sanitize => false)
end
Meta characters in URLs of the @text are escaped by both CGI::escapeHTML() and auto_link!() . So,
&

becomes

&

$ RAILS_ENV=production rake about

About your application's environment
Ruby version              2.0.0 (amd64-freebsd8)
RubyGems version          1.8.25
Rack version              1.4
Rails version             3.2.13
Active Record version     3.2.13
Action Pack version       3.2.13
Active Resource version   3.2.13
Action Mailer version     3.2.13
Active Support version    3.2.13
Middleware                Rack::Cache, 
 ActionDispatch::Static, 
 Rack::Lock, 
 #,
 Rack::Runtime,
 Rack::MethodOverride,
 ActionDispatch::RequestId,
 Rails::Rack::Logger,
 ActionDispatch::ShowExceptions,
 ActionDispatch::DebugExceptions,
 ActionDispatch::RemoteIp,
 ActionDispatch::Callbacks,
 ActiveRecord::ConnectionAdapters::ConnectionManagement,
 ActiveRecord::QueryCache, ActionDispatch::Cookies,
 ActionDispatch::Session::CookieStore,
 ActionDispatch::Flash,
 ActionDispatch::ParamsParser,
 ActionDispatch::Head, Rack::ConditionalGet, Rack::ETag,
 ActionDispatch::BestStandardsSupport,
 OpenIdAuthentication
Application root          (snip)/redmine-2.3.1
Environment               production
Database adapter          sqlite3
Database schema version   20130217094251

journals

Still reproducible in Redmine 3.2.0.
--------------------------------------------------------------------------------

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

  • カテゴリText formatting_26 にセット

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

いいね!0
いいね!0