Bugzilla – Attachment 194421 Details for
Bug 41988
OPAC: News RSS links with HTML not working
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41988: OPAC News RSS links with HTML not working
Bug-41988-OPAC-News-RSS-links-with-HTML-not-workin.patch (text/plain), 3.28 KB, created by
Hammat wele
on 2026-03-04 02:55:51 UTC
(
hide
)
Description:
Bug 41988: OPAC News RSS links with HTML not working
Filename:
MIME Type:
Creator:
Hammat wele
Created:
2026-03-04 02:55:51 UTC
Size:
3.28 KB
patch
obsolete
>From a4ebed2f541b506f90a2a5c149229dbd0b36c7b9 Mon Sep 17 00:00:00 2001 >From: Hammat Wele <hammat.wele@inlibro.com> >Date: Wed, 4 Mar 2026 02:55:13 +0000 >Subject: [PATCH] Bug 41988: OPAC News RSS links with HTML not working > >The news RSS link on the OPAC appears to be invalid when the news content contains HTML. Users cannot subscribe to the feed using standard RSS readers or email clients. > >To reproduce: > >1- Open the OPAC: https://princeville-test.styx.inlibro.net/cgi-bin/koha/opac-main.pl >2- Go to Tools -> HTML customizations -> News >3- Click New Entry with the following settings: > 3-1- Display location: OPAC > 3-2- Publication date: today > 3-3- Title: "News test" > 3-4- Content: click on <> and paste some HTML code, for example: > <span style="color: #ba372a; font-size: 12pt;">Le Prêt entre bibliothèques est mis en pause. Désolés de l'inconvénients.<br />Merci de votre compréhension.</span> >4- Save the entry. >5- Go to the OPAC and copy the "RSS feed for system-wide library news" link. >6- Execute: curl -v http://opac/cgi-bin/koha/opac-news-rss.pl?branchcode= and copy the XML output to https://validator.w3.org/feed/ to check the feed. > ==> The feed is not valid. >7- Try to create a subscription to this link in an email client (e.g., Thunderbird). > ==> It does not work, giving the error "Feed URL is not valid". >8- Apply the patch. >9- Repeat steps 5 and 6. > ==> The feed is now a valid RSS. >10- Repeat step 7. > ==> You can now subscribe to the RSS feed using standard readers and email clients. >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-news-rss.tt | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-news-rss.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-news-rss.tt >index fc4ce084e62..4026c36278a 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-news-rss.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-news-rss.tt >@@ -6,21 +6,23 @@ > <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> > <channel> > <atom:link href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-main.pl" rel="self" type="application/rss+xml" /> >- <title> >+ <title >+ ><![CDATA[ > [% IF ( LibraryNameTitle ) %] > [% tx("News from {library} catalog", { library = LibraryNameTitle }) | html %] > [% ELSE %] > [% t("News from the library") | html %] > [% END %] >+ ]]> > </title> > <!-- prettier-ignore-start --> >- <link>[% OPACBaseURL | html %]/cgi-bin/koha/opac-main.pl</link> >+ <link>[% OPACBaseURL | url %]/cgi-bin/koha/opac-main.pl</link> > <!-- prettier-ignore-end --> > <description></description> > [% FOREACH newsitem IN koha_news %] > <item> > <title>[% newsitem.title | html %]</title> >- <description>[% newsitem.content | $raw %]</description> >+ <description><![CDATA[[% newsitem.content | $raw %]]]></description> > <guid>[% OPACBaseURL | html %]/cgi-bin/koha/opac-main.pl#newsitem[% newsitem.additional_content_id | html %]</guid> > </item> > [% END %] >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 41988
:
194421
|
194453
|
194463