From 2d91095260ad9cf43adf8b161794a7c25da97449 Mon Sep 17 00:00:00 2001 From: Hugo Sales Date: Sun, 25 Apr 2021 21:21:12 +0000 Subject: [PATCH] [UI] Use event 'ShowAttachment' to permit plugins like Embed to alter the representation --- templates/note/view.html.twig | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/templates/note/view.html.twig b/templates/note/view.html.twig index 29495221d9..040e7cf029 100644 --- a/templates/note/view.html.twig +++ b/templates/note/view.html.twig @@ -38,9 +38,15 @@ {% else %} -
- {{ attachment.getTitle() }} -
+ {% for show in handle_event('ShowAttachment', attachment) %} +
+ {{ show | raw }} +
+ {% else %} +
+ {{ attachment.getTitle() }} +
+ {% endfor %} {% endif %} {% endfor %}