diff --git a/app/util/templates.py b/app/util/templates.py index 9405b93..57f16ee 100644 --- a/app/util/templates.py +++ b/app/util/templates.py @@ -1,5 +1,4 @@ from typing import Any, Mapping, overload -from urllib.parse import quote_plus from fastapi import Request, Response from jinja2_fragments.fastapi import Jinja2Blocks @@ -9,7 +8,6 @@ from app.internal.auth.authentication import DetailedUser from app.internal.env_settings import Settings templates = Jinja2Blocks(directory="templates") -templates.env.filters["quote_plus"] = lambda u: quote_plus(u) # pyright: ignore[reportUnknownLambdaType,reportUnknownMemberType,reportUnknownArgumentType] templates.env.filters["zfill"] = lambda val, num: str(val).zfill(num) # pyright: ignore[reportUnknownLambdaType,reportUnknownMemberType,reportUnknownArgumentType] templates.env.globals["vars"] = vars # pyright: ignore[reportUnknownMemberType] templates.env.globals["getattr"] = getattr # pyright: ignore[reportUnknownMemberType] diff --git a/templates/settings_page/download.html b/templates/settings_page/download.html index 51e5214..d4f86a8 100644 --- a/templates/settings_page/download.html +++ b/templates/settings_page/download.html @@ -329,7 +329,7 @@ title="Delete flag" type="button" class="btn btn-square delete-button" - hx-delete="/settings/download/indexer-flag/{{ flag.flag|quote_plus }}" + hx-delete="/settings/download/indexer-flag/{{ flag.flag }}" hx-disabled-elt=".delete-button" hx-target="#flags-form" > diff --git a/templates/settings_page/users.html b/templates/settings_page/users.html index b5f9213..77c2d95 100644 --- a/templates/settings_page/users.html +++ b/templates/settings_page/users.html @@ -84,7 +84,7 @@ name="group" class="select w-full" required {% if u.root %}disabled{% endif %} - hx-patch="/settings/user/{{ u.username|quote_plus }}" + hx-patch="/settings/user/{{ u.username }}" hx-trigger="change" hx-disabled-elt="this" hx-target="#user-list" @@ -122,7 +122,7 @@ Cancel - + < Back to wishlist Sources for {{ book.title }} @@ -75,7 +71,7 @@ type="checkbox" hx-trigger="click" hx-target="this" - hx-post="/wishlist/sources/{{ book.asin|quote_plus }}" + hx-post="/wishlist/sources/{{ book.asin }}" hx-include="#form-{{ loop.index }}" hx-on::after-request="if (event.detail.successful) this.disabled = true" /> diff --git a/templates/wishlist_page/wishlist.html b/templates/wishlist_page/wishlist.html index 2b8e948..bd80640 100644 --- a/templates/wishlist_page/wishlist.html +++ b/templates/wishlist_page/wishlist.html @@ -59,7 +59,7 @@ {{ book.title }}{% include 'icons/list.html' %}