Links on custom field values don't have "external" class
|Assignee:||Go MAEDA||% Done:|
Textile and Markdown formatter in Redmine adds "external" class to
a element when rendering links to an external site. Here is an exmaple:
<a class="external" href="http://www.redmine.org/">
I think that links on custom field should have "external" class for consistency and convenience. Attaching a patch to fix this.
#5 Updated by Go MAEDA almost 3 years ago
- File add-external-class-to-cf-link-v2.diff added
Attaching an updated patch. Fixed test failure.
Failure: Redmine::ListFieldFormatTest#test_field_with_url_pattern_and_multiple_values_should_link_values [test/unit/lib/redmine/field_format/list_format_test.rb:141]: --- expected +++ actual @@ -1 +1 @@ -"<a class=\"external\" href=\"http://localhost/bar\">bar</a>, <a href=\"http://localhost/foo\">foo</a>" +"<a class=\"external\" href=\"http://localhost/bar\">bar</a>, <a class=\"external\" href=\"http://localhost/foo\">foo</a>" bin/rails test test/unit/lib/redmine/field_format/list_format_test.rb:138