This is a follow up to my patch on #2942287: Improve drupal_url with an optional access check and add drupal_link as well.

I recently wanted to use HTML for my drupal_link() function (for a fontawesome icon) and it was simply not working. I improved the function to handle it gracefully, following core's \Drupal\Core\Template\TwigExtension::getLink() way.

Added/tweaked tests around this.

CommentFileSizeAuthor
#2 2978898-n2.patch3.54 KBhanoii

Comments

hanoii created an issue. See original summary.

hanoii’s picture

Status: Active » Needs review
StatusFileSize
new3.54 KB

Attached is the patch.

  • Chi committed 6aae559 on 8.x-2.x authored by hanoii
    Issue #2978898 by hanoii: Add support for HTML markup on drupal_link
    
chi’s picture

Status: Needs review » Fixed

Committed with minor changes. Thanks.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.