Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#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

Change History (8)

comment:1 Changed 4 years ago by saroyanm

  • Component changed from Unknown to Sitescripts

comment:2 Changed 4 years ago by saroyanm

  • Description modified (diff)

comment:3 Changed 4 years ago 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 4 years ago by kzar

  • Cc kzar added

comment:5 follow-up: Changed 4 years ago 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 4 years ago 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 4 years ago by sebastian

Fine with me.

comment:8 in reply to: ↑ 6 Changed 4 years ago 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/

Note: See TracTickets for help on using tickets.