Skip to content

[FIX] Use logo url as is to allow for web urls. #661

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{% set logo_url=logo %}
{% endif %}
{% if logo_url %}
<img src="{{ pathto('_static/' + logo_url, 1) }}" class="logo" alt="logo">
<img src="{{ logo_url|e }}" class="logo" alt="logo">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this being escaped? Isn't it an already-encoded URL?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pradyunsg I don't think that's guaranteed since the logo_url value comes from the user in conf.py and the code I linked to above doesn't seem to be escaping anything.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{% endif %}
{% if docstitle and not theme_logo_only %}
<h1 class="site-logo" id="site-title">{{ docstitle }}</h1>
Expand Down