Project

General

Profile

Actions

Defect #6802

closed

Autolinking should not occur in link titles

Defect #6802: Autolinking should not occur in link titles

Added by Alejandro Mery about 16 years ago. Updated about 2 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Text formatting
Target version:
-
Resolution:
Fixed
Affected version:

Description

In [[www|www.example.org]] the title incorrectly gets converted into an external link.

Using 1.0-stable branch.

Updated by Holger Just about 16 years ago Actions #1

  • Subject changed from autolinking should not occur for titles to Autolinking should not occur in link titles
  • Category set to Text formatting
  • Affected version (unused) set to devel

The issue is actually the other way round. The auto linking of URLs (performed by inline_auto_link in textile/formatter occurs occurs first, the wiki link is only generated after than.

Thus, the above statement is transformed into:

Current behavior
  1. [[www|www.example.org]]
  2. [[www|<a class="external" href="http://www.example.org">www.example.org</a>]]
  3. <a href="/projects/redmine/wiki/www" class="wiki-page new"><a class="external" href="http://www.example.org">www.example.org</a></a>
Expected
  1. [[www|www.example.org]]
  2. <a href="/projects/redmine/wiki/www" class="wiki-page new">www.example.org</a>

This might be solved by reordering rendering methods in source:trunk/app/helpers/application_helper.rb#L453 in a way that parse_wiki_links runs before inline_auto_link. Maybe, these methods need to be included into the textile implementation in source:trunk/lib/redmine/wiki_formatting/textile in the correct ordering.

Updated by Jean-Philippe Lang about 16 years ago Actions #2

Redmine links (eg. wiki, ticket links...) should not be handled by the builtin text formatter so we can easily switch to another one.

Maybe we could fix inline_auto_link instead.

Updated by Go MAEDA about 8 years ago Actions #3

This issue seems to be fixed in Textile. I could not reproduce on Redmine 3.4.6.devel.17477. But it still does not work as expected in Markdown.

Updated by Alejandro Mery about 8 years ago Actions #4

  • Status changed from New to Resolved

Go MAEDA wrote:

This issue seems to be fixed in Textile. I could not reproduce on Redmine 3.4.6.devel.17477. But it still does not work as expected in Markdown.

8 years! amazing. I thought redmine was long dead, feel free to close the ticket.

Updated by Go MAEDA about 8 years ago Actions #5

  • Status changed from Resolved to New

Updated by Go MAEDA about 2 months ago Actions #6

  • Status changed from New to Closed
  • Resolution set to Fixed

Go MAEDA wrote in #note-3:

This issue seems to be fixed in Textile. I could not reproduce on Redmine 3.4.6.devel.17477. But it still does not work as expected in Markdown.

When I wrote #note-3 in 2018, the problem still occurred with the Redcarpet-based Markdown formatter. On the current trunk (7.0.1.devel), it works as expected with both CommonMark Markdown and Textile: the title in [[CookBook documentation|www.example.org]] is not converted into an external link.

I am closing this issue because it can no longer be reproduced.

Actions

Also available in: PDF Atom