blacklight_range_limit
blacklight_range_limit copied to clipboard
span tag in html/head/title when range selected
With 0a1df5f07a57f1b5b55d61d0e564c53bd17be6c9 (ref I've deployed, probably not the cause) and blacklight 7.25.2 the browser tab title (ie /html/head/title
) contains markup when I select a range
ie. after selecting 1590-1943 the title tag looks like this:
<title>Date: <span class="from" data-blrl-begin="1590">1590</span> to <span class="to" data-blrl-end="1943">1943</span> - Blacklight Search Results</title>
this has changed since v8.1.0 (on blacklight (7.22.2)) where the range value was not present at all
The main page title logic is in the main blacklight library. What's happening here is that the range selector is a "normal" filter configuration now, but the title helper in Blacklight::CatalogHelperBehavior#render_search_to_page_title_filter
is expecting to be able to write applied filter labels out to the page title without doing anything to the labels. I'm not sure what the long-term answer ought to be - we should probably, maybe at least be html_safe
on the resulting title? - but you could override that method to patch it in your app.