Bug 22945: Markup error in OPAC search results around lists display

This patch makes minor corrections to the template for OPAC search
results. These corrections fix errors returned by the HTML validator.

To reproduce the problem, perform a search in the OPAC which will return
results which are on one or more lists. Run the page through the W3C
validation service: https://validator.w3.org. Either by pasting in the
URL for the search results (if web accessible) or by viewing source,
copying, and pasting into "Validate by Direct Input."

This patch addresses two specific errors:

 - "Text not allowed in element ul in this context."
 - "Stray end tag span."

To test, apply the patch and try again to reproduce the validation
errors. Those errors should no longer be present. There should be no
visible change to the search results view.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1efe0d4606)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0529975851)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Owen Leonard 2019-05-21 12:07:10 +00:00 committed by Lucas Gass
parent d8e56452c0
commit f60f3ca0e6
1 changed files with 7 additions and 6 deletions

View File

@ -474,13 +474,14 @@
[% IF Koha.Preference('virtualshelves') AND SEARCH_RESULT.shelves.count %]
<div class="results_summary shelves">
<span class="label">Lists:</span>
<ul>
[% FOREACH shelf IN SEARCH_RESULT.shelves %]
<li><a href="/cgi-bin/koha/opac-shelves.pl?op=view&amp;shelfnumber=[% shelf.shelfnumber | uri %]">[% shelf.shelfname | html %]</a></li>
<ul>
[% FOREACH shelf IN SEARCH_RESULT.shelves %]
<li>
<a href="/cgi-bin/koha/opac-shelves.pl?op=view&amp;shelfnumber=[% shelf.shelfnumber | uri %]">[% shelf.shelfname | html %]</a>
[%~ UNLESS loop.last %], [% ELSE %].[% END ~%]
[% END %]
</ul>
</span>
</li>
[% END %]
</ul>
</div>
[% END %]