From 6f53da0fc992a6f6c64b45688130091033e1e787 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Beaupr=C3=A9?= Date: Fri, 22 Nov 2024 11:51:13 -0500 Subject: [PATCH] restore pre-Atom behavior of linking directly to the article RFC4287 section 4.2.7.2 specifies that "rel=alternate" is effectively the default for the link element: If the "rel" attribute is not present, the link element MUST be interpreted as if the link relation type is "alternate". So having a plain `` and a `` is kind of weird, *especially* if they point to different resources. So we just remove the plain entry and *replace* it with the rel=alternate, which is really the default here. The sample Atom feeds in RFC4287 (section 1.1) do give an example *only* with `rel="alternate"`: Atom draft-07 snapshot To refer to the actual Wallabag URL, we use the "via", which is defined in the RFC as: 5. The value "via" signifies that the IRI in the value of the href attribute identifies a resource that is the source of the information provided in the containing element. I'm not sure how widely used that tag is, but I feel that the distinction between `rel="alternate"` is weird at best, and buggy (and certainly introducing unpleasantness in my usage) at worse. Before: That is: After: That is: Closes: #7848 --- templates/Entry/entries.xml.twig | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/templates/Entry/entries.xml.twig b/templates/Entry/entries.xml.twig index 087b61be3..783a1c947 100644 --- a/templates/Entry/entries.xml.twig +++ b/templates/Entry/entries.xml.twig @@ -31,11 +31,9 @@ {% for entry in entries %} <![CDATA[{{ entry.title|e }}]]> - - + - wallabag:{{ domainName|removeScheme|removeWww }}:{{ user }}:entry:{{ entry.id }} {{ entry.updatedAt|date('c') }} {{ entry.createdAt|date('c') }}