Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

span tag in html/head/title when range selected #189

Open
kosarko opened this issue Jun 3, 2022 · 1 comment
Open

span tag in html/head/title when range selected #189

kosarko opened this issue Jun 3, 2022 · 1 comment

Comments

@kosarko
Copy link

kosarko commented Jun 3, 2022

With 0a1df5f (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: &lt;span class="from" data-blrl-begin="1590"&gt;1590&lt;/span&gt; to &lt;span class="to" data-blrl-end="1943"&gt;1943&lt;/span&gt; - 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

@barmintor
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants