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
This commit is contained in:
Rotzbua 2023-01-01 23:18:13 +01:00 committed by GitHub
parent 5841080319
commit ede68fa423
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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 %}

View File

@ -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()