From 6b4b4b55d053eb960a3664539fa6ce5b37e874f0 Mon Sep 17 00:00:00 2001 From: Igor Nikolaev Date: Mon, 8 Feb 2021 13:36:38 +0300 Subject: [PATCH] Render links in property macros. --- CHANGELOG.md | 2 ++ Resources/views/macros.html.twig | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c35d7b..1a60373 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -119,3 +119,5 @@ 7.3.28: Add LocaleProviderInterface::getDefaultLocale(). 7.3.30: Add plain_data() macro. + +7.3.32: Render links in property macros. diff --git a/Resources/views/macros.html.twig b/Resources/views/macros.html.twig index a29ae27..52ab16d 100644 --- a/Resources/views/macros.html.twig +++ b/Resources/views/macros.html.twig @@ -91,6 +91,11 @@ style="font-family: Arial, sans-serif; font-size: 15px; line-height: 23px; color: #333333;"> {{ value }} + {% elseif '://' in value %} + + {{ value }} + {% else %} {{ value|trans|raw }} {% endif %} @@ -212,6 +217,11 @@ style="font-family: Arial, sans-serif; font-size: 15px; line-height: 23px; color: #333333;"> {{ value }} + {% elseif '://' in value %} + + {{ value }} + {% else %} {{ value|trans|raw }} {% endif %}