Opened 10 years ago

Closed 10 years ago

#1855 closed enhancement (fixed)

Turn URLs in tag values into links in the data browser

Reported by: Dan Karran Owned by: Tom Hughes
Priority: minor Milestone:
Component: website Version:
Keywords: Cc:

Description

A number of tags often hold URLs to related information (e.g. many linking to wikipedia entries) but these aren't converted into links when browsing the data through the browser pages (e.g. Castletown). It'd be nice if these could be converted into links to assist users (and search engines).

I appreciate there could be some concerns about spam when automatically linking anything, so perhaps this ought to be restricted to http://*.wikipedia.org/* links for now?

Attachments (2)

link_tag_values.patch (282 bytes) - added by Dan Karran 10 years ago.
link_tag_values.2.patch (343 bytes) - added by Dan Karran 10 years ago.

Download all attachments as: .zip

Change History (6)

Changed 10 years ago by Dan Karran

Attachment: link_tag_values.patch added

comment:1 Changed 10 years ago by Dan Karran

Adding a quick patch to turn all URLs in tag values into links. Does it also need to be passed through sanitize(), and should it be any more restrictive, or should we be as trusting here as we are in people's profiles and diary entries?

comment:2 Changed 10 years ago by Tom Hughes

If you're going to get rid of the h() invocation (and I think you have to drop that) then yes, you absolutely must run it through sanitize instead.

To be clear to anybody else reading this ticket, this patch MUST NOT be committed as it currently stands.

Changed 10 years ago by Dan Karran

Attachment: link_tag_values.2.patch added

comment:3 Changed 10 years ago by Dan Karran

Updated patch attached.

comment:4 Changed 10 years ago by tomhughes

Resolution: fixed
Status: newclosed

(In [15329]) Make links in tags active in the data browser. Fixes #1855.

Note: See TracTickets for help on using tickets.