Skip to content

Commit

Permalink
Remove obsolete HTML keyword link rel="shortcut" (#11069)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Rotzbua committed Jan 1, 2023
1 parent 5841080 commit ede68fa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sphinx/themes/basic/layout.html
Expand Up @@ -137,7 +137,7 @@ <h3>{{ _('Navigation') }}</h3>
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 %}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_build_html.py
Expand Up @@ -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()


Expand Down

0 comments on commit ede68fa

Please sign in to comment.