Skip to content

Fix broken title showing '&nbsp' as text#65

Merged
ronaldtse merged 1 commit into
mainfrom
fix/title-nbsp
May 6, 2026
Merged

Fix broken title showing '&nbsp' as text#65
ronaldtse merged 1 commit into
mainfrom
fix/title-nbsp

Conversation

@ronaldtse
Copy link
Copy Markdown
Contributor

Problem

The browser tab title displays ISO/TC 211 with literal   text instead of a space.

Cause

The theme's head.html uses site.title_html (set to ISO/TC&amp;nbsp;211) for the <title> tag. After Liquid's strip_html | escape filter, the &amp;nbsp; becomes &amp;amp;nbsp; which renders as literal &amp;nbsp; in the browser title bar.

Fix

Override _includes/head.html to use site.title (plain text) for the <title> element. The title_html with &amp;nbsp; is still used correctly in the site header and footer where HTML entities are rendered visually.

The theme head.html uses title_html (which contains &nbsp;) for the
<title> tag. After strip_html | escape, this renders as literal
'&amp;nbsp;' text. Override to use site.title instead for the <title>
element.
@ronaldtse ronaldtse merged commit 963c8bf into main May 6, 2026
3 checks passed
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

Successfully merging this pull request may close these issues.

1 participant