diff options
| author | Rotzbua <Rotzbua@users.noreply.github.com> | 2023-01-01 23:18:13 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-01 22:18:13 +0000 |
| commit | ede68fa423107fbab74d07b307d7dcb03c00dfbd (patch) | |
| tree | 1b23216039b5e861a86c2bb50c7f278fb8690a47 | |
| parent | 584108031919abb016e41bb3dd5c90094d04fa76 (diff) | |
| download | sphinx-git-ede68fa423107fbab74d07b307d7dcb03c00dfbd.tar.gz | |
Remove obsolete HTML keyword ``link rel="shortcut"`` (#11069)
The link relationship keyword `shortcut` does not appear in the HTML 5 specification [1].
It was used by historic browsers (i.e. Internet Explorer 6) which Sphinx no longer supports.
[1]: HTML5 Specification, 4.6.7.8 Link type "icon", https://html.spec.whatwg.org/#rel-icon
| -rw-r--r-- | sphinx/themes/basic/layout.html | 2 | ||||
| -rw-r--r-- | tests/test_build_html.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/themes/basic/layout.html b/sphinx/themes/basic/layout.html index f22b12124..6e9096a1d 100644 --- a/sphinx/themes/basic/layout.html +++ b/sphinx/themes/basic/layout.html @@ -137,7 +137,7 @@ href="{{ pathto('_static/opensearch.xml', 1) }}"/> {%- endif %} {%- if favicon_url %} - <link rel="shortcut icon" href="{{ favicon_url|e }}"/> + <link rel="icon" href="{{ favicon_url|e }}"/> {%- endif %} {%- endif %} {%- block linktags %} diff --git a/tests/test_build_html.py b/tests/test_build_html.py index 11a03b944..d985aad76 100644 --- a/tests/test_build_html.py +++ b/tests/test_build_html.py @@ -1370,7 +1370,7 @@ def test_html_remote_logo(app, status, warning): result = (app.outdir / 'index.html').read_text(encoding='utf8') assert ('<img class="logo" src="https://www.python.org/static/img/python-logo.png" alt="Logo"/>' in result) - assert ('<link rel="shortcut icon" href="https://www.python.org/static/favicon.ico"/>' in result) + assert ('<link rel="icon" href="https://www.python.org/static/favicon.ico"/>' in result) assert not (app.outdir / 'python-logo.png').exists() |
