Project

General

Profile

Actions

Defect #19304

closed

<a> tag without attributes in description results in undefined method + for nil:NilClass

Added by Pavel Rosický over 9 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Normal
Category:
Code cleanup/refactoring
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Cant reproduce
Affected version:

Description

Observed Behavior
Create new issue with description "<a>link.com</a>" (without tag attributes)

ActionView::Template::Error: undefined method `+' for nil:NilClass
[RAILS_ROOT]/app/helpers/application_helper.rb:872:in `block in parse_redmine_links'
[RAILS_ROOT]/app/helpers/application_helper.rb:741:in `gsub!'
[RAILS_ROOT]/app/helpers/application_helper.rb:741:in `parse_redmine_links'
[RAILS_ROOT]/app/helpers/application_helper.rb:583:in `block (2 levels) in textilizable'

Workaround
http://www.redmine.org/projects/redmine/repository/revisions/14003/entry/trunk/app/helpers/application_helper.rb#L741
<a( [^>]+?)?>(.*?)</a> should be <a( [^>]+?)>(.*?)</a>

Environment:
Redmine version 3.0.0.stable
Ruby version 2.1.5-p273 (2014-11-13) [i386-mingw32]
Rails version 4.2.0
Environment production
Database adapter Mysql2


Files

application_helper.rb.patch (1.22 KB) application_helper.rb.patch Pavel Rosický, 2015-03-08 16:20
application_helper_test.rb.patch (1.11 KB) application_helper_test.rb.patch test case Pavel Rosický, 2015-03-11 00:26
Actions

Also available in: Atom PDF