Bug 39974

Summary: "OpacMoreSearches" HTML customization generates invalid HTML
Product: Koha Reporter: David Cook <dcook>
Component: ToolsAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39975
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 24220    
Bug Blocks:    

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.