From b11c68c88d51c0e1ebde3a0bdaa7cd931b436ef4 Mon Sep 17 00:00:00 2001 From: philli-m <5871230+philli-m@users.noreply.github.com> Date: Thu, 26 Oct 2023 11:41:15 +0200 Subject: [PATCH 1/3] assets/base: restyle hr as BO styles break in safari fixes #879 --- digitalstrategie/assets/scss/_base.scss | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/digitalstrategie/assets/scss/_base.scss b/digitalstrategie/assets/scss/_base.scss index fbda5068..69ba7957 100644 --- a/digitalstrategie/assets/scss/_base.scss +++ b/digitalstrategie/assets/scss/_base.scss @@ -38,3 +38,9 @@ h5 { h1 { margin-bottom: 0.9em !important; // all h1 have same spacing as landing page } + +// fix for safari break on shorthand border with issue #879 +hr { + border: none; + border-bottom: 1px solid $gray; +} From aa4508ffe51fbdba3acab783ec7715bd06361412 Mon Sep 17 00:00:00 2001 From: philli-m <5871230+philli-m@users.noreply.github.com> Date: Thu, 26 Oct 2023 14:37:00 +0200 Subject: [PATCH 2/3] settings/dev: update csp to include BO js on older browsers and updagrade requests to be secure fixes #844 --- digitalstrategie/settings/dev.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/digitalstrategie/settings/dev.py b/digitalstrategie/settings/dev.py index a7458abd..d10c4a65 100644 --- a/digitalstrategie/settings/dev.py +++ b/digitalstrategie/settings/dev.py @@ -46,7 +46,13 @@ # CSP for development (not very strict) CSP_DEFAULT_SRC = ["'self'"] # unsafe-eval only for testing -CSP_SCRIPT_SRC = ["'unsafe-eval'"] +CSP_SCRIPT_SRC = [ + "'unsafe-eval'", + "'self'", + "https://stats.liqd.net", + "https://berlin.de", + "https://www.berlin.de", +] CSP_SCRIPT_SRC_ATTR = ["'none'"] # wagtail (and webpack during dev) requires unsafe-inline CSP_SCRIPT_SRC_ELEM = [ @@ -111,3 +117,4 @@ CSP_WORKER_SRC = ["'none'"] CSP_EXCLUDE_URL_PREFIXES = "/admin" CSP_REPORT_ONLY = False +CSP_UPGRADE_INSECURE_REQUESTS = True From e5587c9e812a6f3da70037b26402e616a87e8578 Mon Sep 17 00:00:00 2001 From: philli-m <5871230+philli-m@users.noreply.github.com> Date: Thu, 26 Oct 2023 14:53:18 +0200 Subject: [PATCH 3/3] templates/search_results: update string for search results fixes #853 --- changelog/879.md | 5 +++++ digitalstrategie/templates/search_results.html | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 changelog/879.md diff --git a/changelog/879.md b/changelog/879.md new file mode 100644 index 00000000..77185f99 --- /dev/null +++ b/changelog/879.md @@ -0,0 +1,5 @@ +### Fixed + +- restyle hr tag as BO styles break in safari fixes #879 +- add BO js urls to script_src for older browsers and add upgrade requests config fixes #844 +- change string on search results page fixes #853 diff --git a/digitalstrategie/templates/search_results.html b/digitalstrategie/templates/search_results.html index 85920451..bce77977 100644 --- a/digitalstrategie/templates/search_results.html +++ b/digitalstrategie/templates/search_results.html @@ -48,9 +48,9 @@

{% blocktranslate with search_term=request.GET.q %}Search for "{{ search_term }}".{% endblocktranslate %} {% blocktranslate count counter=object_list|length %} - {{ counter }} measure. + {{ counter }} result. {% plural %} - {{ counter }} measures. + {{ counter }} results. {% endblocktranslate %}

{% for result in object_list %} @@ -83,4 +83,3 @@

{% endif %} {% endblock %} -