Skip to content
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

Ubuntu fixes for V1 #8540

Merged
merged 4 commits into from Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 8 additions & 1 deletion docs/extra/redirects.js
Expand Up @@ -88,6 +88,13 @@ const lookup = {
'history': '/changelog/',
}

function sanitizeURL(url) {
// escape untrusted source by creating an anchor element and letting the browser parse it
let a = document.createElement('a');
a.href = url;
return a.href;
}

function main() {
const fragment = location.hash.substr(1)
if (fragment === '' || location.pathname !== '/') {
Expand All @@ -105,7 +112,7 @@ function main() {
.replace(/(v\d)-(\d+-\d{4})/, '$1$2')
}

window.location = new_url
window.location = sanitizeURL(new_url)
}

main()
4 changes: 2 additions & 2 deletions docs/requirements.txt
Expand Up @@ -5,9 +5,9 @@ flake8-quotes==3.3.1
hypothesis==6.54.4
markdown-include==0.8.0
mdx-truly-sane-lists==1.3
mkdocs==1.4.2
mkdocs==1.5.3
mkdocs-exclude==1.0.2
mkdocs-material==9.0.5
mkdocs-material==9.5.1
pyupgrade==2.37.3
sqlalchemy
orjson
Expand Down
4 changes: 2 additions & 2 deletions mkdocs.yml
Expand Up @@ -76,8 +76,8 @@ markdown_extensions:
- pymdownx.extra
- mdx_truly_sane_lists
- pymdownx.emoji:
emoji_index: !!python/name:materialx.emoji.twemoji
emoji_generator: !!python/name:materialx.emoji.to_svg
emoji_index: !!python/name:material.extensions.emoji.twemoji
emoji_generator: !!python/name:material.extensions.emoji.to_svg
- pymdownx.tabbed:
alternate_style: true

Expand Down