Bug 23378 - Invalid OPAC search RSS: unescaped characters
Summary: Invalid OPAC search RSS: unescaped characters
Status: RESOLVED DUPLICATE of bug 16111
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 21526
Blocks:
  Show dependency treegraph
 
Reported: 2019-07-25 20:43 UTC by Victor Grousset/tuxayo
Modified: 2019-08-23 23:50 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Grousset/tuxayo 2019-07-25 20:43:55 UTC
== Test plan ==
1. search something in the OPAC
2. open the RSS feed/copy the URL
3. validate it: https://validator.w3.org/feed/
4. you will get something like:
XML parsing error: <unknown>:16:48: not well-formed (invalid token) 
<link>/cgi-bin/koha/opac-search.pl?idx=kw&q=MY_SEARCH_QUERY_HERE&amp;format=rss2</link>

It seems that the equal sign needs some escaping.

I heard there were escape changes in the last few versions. Is that related?

The version 16.11 is said to not have this issue (although testing on a 16.11 demo gives the same result)
As someone who was consuming the RSS feed couldn't anymore when switching from 16.11 to 18.11

There are still escape differences between these versions even if the first error is still here. Here are the differences if that helps.

18.05
     <link>/cgi-bin/koha/opac-search.pl?idx=kw&amp;q=lea&amp;format=rss2</link>
     <atom:link rel="self" type="application/rss+xml" href="/cgi-bin/koha/opac-search.pl?idx%3Dkw%26q%3Dlea&amp;sort_by=acqdate_dsc&amp;format=rss2"/>


18.11
     <link>/cgi-bin/koha/opac-search.pl?idx=kw&q=lea&amp;format=rss2</link>
     <atom:link rel="self" type="application/rss+xml" href="/cgi-bin/koha/opac-search.pl?idx=kw&q=lea&amp;sort_by=acqdate_dsc&amp;format=rss2"/>

«idx=kw&amp;» vs «idx=kw&»
«idx%3Dkw%26q%3D» vs «idx=kw»
Comment 1 Martin Renvoize 2019-08-14 16:48:46 UTC
Possibly caused by bug 21526..?
Comment 2 Owen Leonard 2019-08-23 23:50:03 UTC

*** This bug has been marked as a duplicate of bug 16111 ***