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- Go to Tools -> HTML customizations -> News
2- Click New Entry with the following settings:
2-1- Display location: OPAC
2-2- Publication date: today
2-3- Title: "News test"
2-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>
3- Save the entry.
4- Go to the OPAC and copy the "RSS feed for system-wide library news"
link.
5- 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.
6- 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".
7- Apply the patch.
8- Repeat steps 5 and 6.
==> The feed is now a valid RSS.
9- Repeat step 7.
==> You can now subscribe to the RSS feed using standard readers
and email clients.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
5e84dcd7a7
commit
85593df7c2
|
|
@ -6,21 +6,23 @@
|
||||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||||
<channel>
|
<channel>
|
||||||
<atom:link href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-main.pl" rel="self" type="application/rss+xml" />
|
<atom:link href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-main.pl" rel="self" type="application/rss+xml" />
|
||||||
<title>
|
<title
|
||||||
|
><![CDATA[
|
||||||
[% IF ( LibraryNameTitle ) %]
|
[% IF ( LibraryNameTitle ) %]
|
||||||
[% tx("News from {library} catalog", { library = LibraryNameTitle }) | html %]
|
[% tx("News from {library} catalog", { library = LibraryNameTitle }) | html %]
|
||||||
[% ELSE %]
|
[% ELSE %]
|
||||||
[% t("News from the library") | html %]
|
[% t("News from the library") | html %]
|
||||||
[% END %]
|
[% END %]
|
||||||
|
]]>
|
||||||
</title>
|
</title>
|
||||||
<!-- prettier-ignore-start -->
|
<!-- 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 -->
|
<!-- prettier-ignore-end -->
|
||||||
<description></description>
|
<description></description>
|
||||||
[% FOREACH newsitem IN koha_news %]
|
[% FOREACH newsitem IN koha_news %]
|
||||||
<item>
|
<item>
|
||||||
<title>[% newsitem.title | html %]</title>
|
<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>
|
<guid>[% OPACBaseURL | html %]/cgi-bin/koha/opac-main.pl#newsitem[% newsitem.additional_content_id | html %]</guid>
|
||||||
</item>
|
</item>
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue