Bug 39974 - "OpacMoreSearches" HTML customization generates invalid HTML
Summary: "OpacMoreSearches" HTML customization generates invalid HTML
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on: 24220
Blocks:
  Show dependency treegraph
 
Reported: 2025-05-23 00:20 UTC by David Cook
Modified: 2025-05-23 00:22 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Cook 2025-05-23 00:20:27 UTC
OpacMoreSearches is supposed to be one or more <li> elements. 

However, when you save it in HTML customizations, it'll add a <ul></ul> tags around the <li> elements you define.

Moreover, when you look at the HTML, you notice how OpacMoreSearches injects a <div> into a <ul>:

<ul class="nav" id="moresearches">
<li class="nav-item"></li>
<div id="OpacMoreSearches">
<div class="default_item">
<div class="default_body">
<ul>
<li><a>New content</a></li>
</ul>
</div>
</div>
</div>
</ul>

While a lot of places where we use HTML customizations can validly inject a <div>, this isn't one of them.

We might want to add a way for HTML customizations to just inject content directly without using wrappers.