Opened on 12/09/2015 at 05:49:36 PM

Closed on 12/22/2015 at 03:08:14 PM

Last modified on 01/07/2016 at 03:04:00 PM

#3400 closed change (rejected)

Have better solution instead of linkify

Reported by: saroyanm Assignee:
Priority: Unknown Milestone:
Module: Sitescripts Keywords:
Cc: greiner, sebastian, kzar Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description (last modified by saroyanm)

Background

In our CMS for localized link generation we are using linkify custom filters, which generate <a href="..."> not closed tag, which reduce flexibility in generating HTML, so I'll suggest to have a function that will return just link instead, so authors can add attribute and will be possible to use in markdown.

What to change

  • Introduce new custom filters that will return localized link URL if available, otherwise fallback to default locale.
  • deprecate linkify filter

Attachments (0)

Change History (8)

comment:1 Changed on 12/09/2015 at 05:50:59 PM by saroyanm

  • Component changed from Unknown to Sitescripts

comment:2 Changed on 12/09/2015 at 05:56:06 PM by saroyanm

  • Description modified (diff)

comment:3 Changed on 12/22/2015 at 02:32:37 PM by kzar

  • Cc sebastian added

Well the linkify filter is also setting the hreflang attribute for the opening <a> tag. With your suggestion of replacing linkify with something that just returned a URL, how would we ensure the hreflang attribute was set correctly?

comment:4 Changed on 12/22/2015 at 02:45:58 PM by kzar

  • Cc kzar added

comment:5 follow-up: Changed on 12/22/2015 at 03:08:14 PM by sebastian

  • Resolution set to rejected
  • Status changed from new to closed

Also note that you can pass additional keywords to the linkify filter which turn into additional HTML attributes. So it's already as flexible as a filter to generate HTML links can be.

comment:6 in reply to: ↑ 5 ; follow-up: Changed on 01/04/2016 at 10:57:56 AM by greiner

Replying to sebastian:

Also note that you can pass additional keywords to the linkify filter which turn into additional HTML attributes. So it's already as flexible as a filter to generate HTML links can be.

Note that the documentation doesn't mention this feature. Therefore I'd suggest updating it to reflect that this is possible.

comment:7 Changed on 01/04/2016 at 11:07:16 AM by sebastian

Fine with me.

comment:8 in reply to: ↑ 6 Changed on 01/07/2016 at 03:04:00 PM by kzar

Replying to greiner:

Note that the documentation doesn't mention this feature. Therefore I'd suggest updating it to reflect that this is possible.

Good point, I've opened a review for that here https://codereview.adblockplus.org/29333291/

Add Comment

Modify Ticket

Change Properties
Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none).
 
Note: See TracTickets for help on using tickets.