Skip to content

Commit 18b4660

Browse files
sstidlStefan Stidl
andauthored
docker: apply TITLE to modern page heading (#788)
Co-authored-by: Stefan Stidl <sti-github@stidl.com>
1 parent d18552f commit 18b4660

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

docker/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ if [[ "$MODE" == "frontend" || "$MODE" == "dual" || "$MODE" == "standalone" ]];
106106
TITLE_ESCAPED=$(sed_escape "$TITLE_HTML_ESCAPED")
107107
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
108108
sed -i "s/<title>LibreSpeed<\\/title>/<title>$TITLE_ESCAPED<\\/title>/g" /var/www/html/index.html
109-
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
109+
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
110110
fi
111111

112112
# Support legacy EMAIL env var as fallback for GDPR_EMAIL

tests/e2e/title-special-chars.spec.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ test.describe('TITLE special characters', () => {
77
test('modern page title supports umlauts and quotes', async ({ page }) => {
88
await page.goto(`${baseUrls.standaloneNew}/index-modern.html`);
99
await expect(page).toHaveTitle(`${specialTitle} - Free and Open Source Speedtest`);
10+
await expect(page.locator('main > h1')).toHaveText(specialTitle);
1011
});
1112

1213
test('classic heading supports umlauts and quotes', async ({ page }) => {

0 commit comments

Comments
 (0)