Bug 19875 - When & is in the title of a search result, subscribing via rss can be broken
Summary: When & is in the title of a search result, subscribing via rss can be broken
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Christophe Croullebois
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-22 14:32 UTC by Christophe Croullebois
Modified: 2018-12-03 20:04 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
patch (1.28 KB, patch)
2017-12-26 14:01 UTC, Christophe Croullebois
Details | Diff | Splinter Review
Bug 19875: escape & in rss feed (1.28 KB, patch)
2018-01-25 10:49 UTC, Christophe Croullebois
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Christophe Croullebois 2017-12-22 14:32:04 UTC
This issue is not in all cases (depend on many factors).
It is due to the xml syntax where the use of "&" is forbidden and must be "&"
Koha do the job in this line :
<title>[% SEARCH_RESULT.title |html %].......
With the use of "|html"
But not in this line :
Place Hold on <i>[% SEARCH_RESULT.title %]</i>......
The patch is very light just adds "|html" in the line above.
#################
Test Plan :
1° in opac do a search where you can find "&" in the title
2° in the result page click on the rss button on the right of "Your search returned n results." (Subscribe to this search)
3° if your subscribe is ok you can not perform the test :o(
4° if your subscribe is nok you can apply the patch
5° test the same work flow with the patch the subscribe must be ok.
Thx
Comment 1 Jonathan Druart 2017-12-22 16:54:21 UTC
Hi Christophe, do you plan to attach a patch?
Comment 2 Christophe Croullebois 2017-12-26 14:01:39 UTC
Created attachment 70155 [details] [review]
patch

thx to test
Comment 3 Christophe Croullebois 2017-12-26 14:03:05 UTC
(In reply to Jonathan Druart from comment #1)
> Hi Christophe, do you plan to attach a patch?

Hi Jonathan, done, thx
Comment 4 Roch D'Amour 2018-01-12 23:41:37 UTC
I applied the patch, searched for results with a "&" in the title, and subscribed to the RSS feed. The feed show up, but I only get entrys up untill the records with the "&" in the title. After this records, nothing else show up. I followed the test plan, and I was wondering what do you meant by "subscribe is ok | nok"?
Comment 5 Christophe Croullebois 2018-01-25 10:39:42 UTC
(In reply to Roch D'Amour from comment #4)
> I applied the patch, searched for results with a "&" in the title, and
> subscribed to the RSS feed. The feed show up, but I only get entrys up
> untill the records with the "&" in the title. After this records, nothing
> else show up. I followed the test plan, and I was wondering what do you
> meant by "subscribe is ok | nok"?

Hello,
what you describe is the result without patch =>nok
Effectively if you have 10 result in the search and if a title with "&" is in the row 5, you'll see only the 5 firt rows.
After applying the patch you'll see the 10 result and your subscribe must be ok (you can see links active in your browser).
Hoping be clearer.
Thx for your test
Regards
Comment 6 Christophe Croullebois 2018-01-25 10:49:08 UTC
Created attachment 70911 [details] [review]
Bug 19875: escape & in rss feed
Comment 7 Katrin Fischer 2018-02-27 15:17:44 UTC
Hi Christophe, 

I am not sure why, but your change breaks the rendering of the RSS is in the browser for me. :(
Comment 8 Christophe Croullebois 2018-02-27 15:39:47 UTC
(In reply to Katrin Fischer from comment #7)
> Hi Christophe, 
> 
> I am not sure why, but your change breaks the rendering of the RSS is in the
> browser for me. :(

Hi Katrin,

in fact I had to close this one because now it is obsolete due to 19568 and his correction on 20286.
I have seen when reporting 20286 that there is no more issues with the '&'.
So I close this one, thx Katrine.