Bug 23378

Summary: Invalid OPAC search RSS: unescaped characters
Product: Koha Reporter: Victor Grousset/tuxayo <victor>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: david.roberts, martin.renvoize
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16111
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 21526    
Bug Blocks:    

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 ***