docker: apply TITLE to modern page heading (#788)

Co-authored-by: Stefan Stidl <sti-github@stidl.com>
This commit is contained in:
sstidl 2026-04-14 10:12:49 +02:00 committed by GitHub
parent d18552fe8a
commit 18b46600d0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View file

@ -106,7 +106,7 @@ if [[ "$MODE" == "frontend" || "$MODE" == "dual" || "$MODE" == "standalone" ]];
TITLE_ESCAPED=$(sed_escape "$TITLE_HTML_ESCAPED")
sed -i "s/<title>LibreSpeed<\\/title>/<title>$TITLE_ESCAPED<\\/title>/g; s/<h1>LibreSpeed<\\/h1>/<h1>$TITLE_ESCAPED<\\/h1>/g" /var/www/html/index-classic.html
sed -i "s/<title>LibreSpeed<\\/title>/<title>$TITLE_ESCAPED<\\/title>/g" /var/www/html/index.html
sed -i "s/<title>LibreSpeed - Free and Open Source Speedtest<\\/title>/<title>$TITLE_ESCAPED - Free and Open Source Speedtest<\\/title>/g" /var/www/html/index-modern.html
sed -i "s/<title>LibreSpeed - Free and Open Source Speedtest<\\/title>/<title>$TITLE_ESCAPED - Free and Open Source Speedtest<\\/title>/g; s/<h1>Free and Open Source Speedtest\\.<\\/h1>/<h1>$TITLE_ESCAPED<\\/h1>/g" /var/www/html/index-modern.html
fi
# Support legacy EMAIL env var as fallback for GDPR_EMAIL

View file

@ -7,6 +7,7 @@ test.describe('TITLE special characters', () => {
test('modern page title supports umlauts and quotes', async ({ page }) => {
await page.goto(`${baseUrls.standaloneNew}/index-modern.html`);
await expect(page).toHaveTitle(`${specialTitle} - Free and Open Source Speedtest`);
await expect(page.locator('main > h1')).toHaveText(specialTitle);
});
test('classic heading supports umlauts and quotes', async ({ page }) => {