From 48c806954eecc242227ad9868eabe03d1d415621 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Sun, 5 Sep 2021 16:03:00 +0200 Subject: [PATCH 1/3] [fix] make /preferences more CSP compliant - simple & oscar theme in simple & oscar theme replace bar-graph's *styles* by CSP compliant implementation in:: searx/static/themes/__common__/less/stats.less Fixed files:: ./oscar/preferences.html:29: {{- "" -}} ./oscar/preferences.html:30: {{- "" -}} ./oscar/preferences.html:31: {{- "" -}} ./simple/preferences.html:43: {{- "" -}} ./simple/preferences.html:44: {{- "" -}} ./simple/preferences.html:45: {{- "" -}} Reported-by: https://github.com/searxng/searxng/issues/57 Signed-off-by: Markus Heiser --- searx/templates/oscar/preferences.html | 6 +++--- searx/templates/simple/preferences.html | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/searx/templates/oscar/preferences.html b/searx/templates/oscar/preferences.html index c47675562..f46d1e620 100644 --- a/searx/templates/oscar/preferences.html +++ b/searx/templates/oscar/preferences.html @@ -27,9 +27,9 @@ {{- stats[engine_name].time -}}{{- "" -}} {{- "" -}} diff --git a/searx/templates/simple/preferences.html b/searx/templates/simple/preferences.html index e3b1545b9..ede958450 100644 --- a/searx/templates/simple/preferences.html +++ b/searx/templates/simple/preferences.html @@ -41,9 +41,9 @@ {{- stats[engine_name].time -}}{{- "" -}} {{- "" -}} From ad528c706efb46b415e460838f4562241a2d10ba Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Sun, 5 Sep 2021 16:58:56 +0200 Subject: [PATCH 2/3] [fix] make result template map more CSP compliant - simple & oscar Add osm-map-box in:: searx/static/themes/__common__/less/result_templates.less Replaced sty= in files:: ./oscar/result_templates/map.html:64:
./simple/result_templates/map.html:65: Reported-by: https://github.com/searxng/searxng/issues/57 Signed-off-by: Markus Heiser --- searx/static/themes/__common__/less/result_templates.less | 5 +++++ searx/static/themes/oscar/src/less/logicodev-dark/oscar.less | 1 + searx/static/themes/oscar/src/less/logicodev/oscar.less | 1 + searx/static/themes/oscar/src/less/pointhi/oscar.less | 1 + searx/static/themes/simple/src/less/style.less | 1 + searx/templates/oscar/result_templates/map.html | 2 +- searx/templates/simple/result_templates/map.html | 2 +- 7 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 searx/static/themes/__common__/less/result_templates.less diff --git a/searx/static/themes/__common__/less/result_templates.less b/searx/static/themes/__common__/less/result_templates.less new file mode 100644 index 000000000..d67aecae4 --- /dev/null +++ b/searx/static/themes/__common__/less/result_templates.less @@ -0,0 +1,5 @@ +.osm-map-box { + height:300px; + width:100%; + margin: 10px 0; +} diff --git a/searx/static/themes/oscar/src/less/logicodev-dark/oscar.less b/searx/static/themes/oscar/src/less/logicodev-dark/oscar.less index b0dbaee06..c1a2fc236 100644 --- a/searx/static/themes/oscar/src/less/logicodev-dark/oscar.less +++ b/searx/static/themes/oscar/src/less/logicodev-dark/oscar.less @@ -1,6 +1,7 @@ @import "../logicodev/variables.less"; @import "../../../../__common__/less/new_issue.less"; @import "../../../../__common__/less/stats.less"; +@import "../../../../__common__/less/result_templates.less"; @import "../../generated/pygments-logicodev.less"; @stacked-bar-chart: rgb(213, 216, 215, 1); diff --git a/searx/static/themes/oscar/src/less/logicodev/oscar.less b/searx/static/themes/oscar/src/less/logicodev/oscar.less index 7457154cb..19e1c98f1 100644 --- a/searx/static/themes/oscar/src/less/logicodev/oscar.less +++ b/searx/static/themes/oscar/src/less/logicodev/oscar.less @@ -1,6 +1,7 @@ @import "variables.less"; @import "../../../../__common__/less/new_issue.less"; @import "../../../../__common__/less/stats.less"; +@import "../../../../__common__/less/result_templates.less"; @import "../../generated/pygments-logicodev.less"; @import "navbar.less"; diff --git a/searx/static/themes/oscar/src/less/pointhi/oscar.less b/searx/static/themes/oscar/src/less/pointhi/oscar.less index f5ea85467..5961c661e 100644 --- a/searx/static/themes/oscar/src/less/pointhi/oscar.less +++ b/searx/static/themes/oscar/src/less/pointhi/oscar.less @@ -1,6 +1,7 @@ @import "variables.less"; @import "../../../../__common__/less/new_issue.less"; @import "../../../../__common__/less/stats.less"; +@import "../../../../__common__/less/result_templates.less"; @import "../../generated/pygments-pointhi.less"; @import "footer.less"; diff --git a/searx/static/themes/simple/src/less/style.less b/searx/static/themes/simple/src/less/style.less index 49e81acbd..c30d3e706 100644 --- a/searx/static/themes/simple/src/less/style.less +++ b/searx/static/themes/simple/src/less/style.less @@ -10,6 +10,7 @@ @import "../../__common__/less/new_issue.less"; @import "../../__common__/less/stats.less"; +@import "../../__common__/less/result_templates.less"; @import (inline) "../../node_modules/normalize.css/normalize.css"; @import "../generated/ion.less"; @import "definitions.less"; diff --git a/searx/templates/oscar/result_templates/map.html b/searx/templates/oscar/result_templates/map.html index eb3fccfc0..3b7ba1111 100644 --- a/searx/templates/oscar/result_templates/map.html +++ b/searx/templates/oscar/result_templates/map.html @@ -64,7 +64,7 @@ {%- if (result.latitude and result.longitude) or result.boundingbox -%}
-
+
{%- endif -%} diff --git a/searx/templates/simple/result_templates/map.html b/searx/templates/simple/result_templates/map.html index 8b08bda6e..dc6a62010 100644 --- a/searx/templates/simple/result_templates/map.html +++ b/searx/templates/simple/result_templates/map.html @@ -45,7 +45,7 @@ {{- result_sub_footer(result, proxify) -}} {% if (result.latitude and result.longitude) or result.boundingbox -%} - + {%- endif %} {{- result_footer(result) }} From 0d070fde923245f14e730ef1c8da1a9161f0c96a Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Mon, 6 Sep 2021 11:12:17 +0200 Subject: [PATCH 3/3] [build] /static --- .../themes/oscar/css/logicodev-dark.css | 7 ++++++- .../themes/oscar/css/logicodev-dark.min.css | Bin 21432 -> 21483 bytes .../oscar/css/logicodev-dark.min.css.map | Bin 11327 -> 11413 bytes searx/static/themes/oscar/css/logicodev.css | 7 ++++++- .../static/themes/oscar/css/logicodev.min.css | Bin 17784 -> 17835 bytes .../themes/oscar/css/logicodev.min.css.map | Bin 9857 -> 9943 bytes searx/static/themes/oscar/css/pointhi.css | 7 ++++++- searx/static/themes/oscar/css/pointhi.min.css | Bin 13172 -> 13223 bytes .../themes/oscar/css/pointhi.min.css.map | Bin 7799 -> 7885 bytes .../src/generated/pygments-logicodev.less | 2 +- .../oscar/src/generated/pygments-pointhi.less | 2 +- searx/static/themes/simple/css/searx-rtl.css | 7 ++++++- .../themes/simple/css/searx-rtl.min.css | Bin 33877 -> 33928 bytes .../themes/simple/css/searx-rtl.min.css.map | Bin 19064 -> 19150 bytes searx/static/themes/simple/css/searx.css | 7 ++++++- searx/static/themes/simple/css/searx.min.css | Bin 33838 -> 33889 bytes .../themes/simple/css/searx.min.css.map | Bin 19008 -> 19094 bytes .../themes/simple/src/generated/pygments.less | 2 +- 18 files changed, 33 insertions(+), 8 deletions(-) diff --git a/searx/static/themes/oscar/css/logicodev-dark.css b/searx/static/themes/oscar/css/logicodev-dark.css index bbf58c86d..f2b7c0f0d 100644 --- a/searx/static/themes/oscar/css/logicodev-dark.css +++ b/searx/static/themes/oscar/css/logicodev-dark.css @@ -369,9 +369,14 @@ .bar100 { width: 100%; } +.osm-map-box { + height: 300px; + width: 100%; + margin: 10px 0; +} /* this file is generated automatically by searx_extra/update/update_pygments.py - using pygments version 2.9.0 + using pygments version 2.10.0 */ .code-highlight .linenos { -webkit-touch-callout: none; diff --git a/searx/static/themes/oscar/css/logicodev-dark.min.css b/searx/static/themes/oscar/css/logicodev-dark.min.css index c70e129a7471818e70b5e578c06168e7a0c72d26..bdc004bcee3bb1e7b28b804e42306793cbb9c28e 100644 GIT binary patch delta 71 zcmdn7obmN?#tod@2KmLgy19u3x=HyJ)fuUo=@}(f#s&rj71rgMDJ26v*zc0q;0WJPh|$#OjGn-#cccmM#NgBQpE delta 18 acmaF8oN>o;#tod@lO1`)HwSai@BjcuJO-cu diff --git a/searx/static/themes/oscar/css/logicodev-dark.min.css.map b/searx/static/themes/oscar/css/logicodev-dark.min.css.map index 73d244632a66815f382b337d71875edfbeb21fc5..a9dbae0c81559f3593b62c916ab516cbedaf6a71 100644 GIT binary patch delta 115 zcmdlVF*R~R<>c3lViTQ(1&UIOOLI!%OHy+SauQ2Yix<{2POKE2T){%e12IKWvz-en5&=%L$Q|wi Z0Z+5HAnpMHL$jtLb^`)Kbh92NcLsBs7wP~2 diff --git a/searx/static/themes/oscar/css/logicodev.css b/searx/static/themes/oscar/css/logicodev.css index f20418dc2..28d5656bf 100644 --- a/searx/static/themes/oscar/css/logicodev.css +++ b/searx/static/themes/oscar/css/logicodev.css @@ -369,9 +369,14 @@ .bar100 { width: 100%; } +.osm-map-box { + height: 300px; + width: 100%; + margin: 10px 0; +} /* this file is generated automatically by searx_extra/update/update_pygments.py - using pygments version 2.9.0 + using pygments version 2.10.0 */ .code-highlight .linenos { -webkit-touch-callout: none; diff --git a/searx/static/themes/oscar/css/logicodev.min.css b/searx/static/themes/oscar/css/logicodev.min.css index eb99c58a3264f3d576fe65d809c1b4355fde9b5e..a6d47a7711f7d1bb83d1990bbd396429a28d5bbd 100644 GIT binary patch delta 71 zcmey-#kjhgaRVo}L4I+rZf;_MZc=_lbw+AtdPa$rv4KHBg>`vmN=b&5p@D&_b#7u& ZdS)JwT~MJgSy5bgvK$ZlW(DpDD*%sk7eN33 delta 18 ZcmZ48&G@5>aRVp!WJezH&B5FeRsceL1{nYV diff --git a/searx/static/themes/oscar/css/logicodev.min.css.map b/searx/static/themes/oscar/css/logicodev.min.css.map index ddea7f7b4f071fd2f374b0dc9bf53726eb912234..c3b095bd62ebb978e5f2d71b6d4a3e16db3a63ed 100644 GIT binary patch delta 70 zcmZqlz3w}qf1mI{uS4iVE}jJ32b* Yc!LO6XV=Kh&fKTP8KXAyD;F^X0Fk#BOaK4? delta 26 icmcca+vq!?f8*YbT+D{9ftzP?pB86~*qo|d#0&tOHVQ`o diff --git a/searx/static/themes/oscar/css/pointhi.css b/searx/static/themes/oscar/css/pointhi.css index e3eb94093..5a75a0659 100644 --- a/searx/static/themes/oscar/css/pointhi.css +++ b/searx/static/themes/oscar/css/pointhi.css @@ -369,9 +369,14 @@ .bar100 { width: 100%; } +.osm-map-box { + height: 300px; + width: 100%; + margin: 10px 0; +} /* this file is generated automatically by searx_extra/update/update_pygments.py - using pygments version 2.9.0 + using pygments version 2.10.0 */ .code-highlight .linenos { -webkit-touch-callout: none; diff --git a/searx/static/themes/oscar/css/pointhi.min.css b/searx/static/themes/oscar/css/pointhi.min.css index 87d411ecb35b7f827b4478813883d6f004d5515a..283e484b71ae9f96efaaeabfbf1a6502a0f27508 100644 GIT binary patch delta 69 zcmey8wmf|UC$~XmI{uE1jyk@M&L9HF c@&>WMV%{LGtFvq5W^Qg{0mg{U_R<#20OXMwz5oCK delta 26 icmX?W``uow1I=$NH4!QS2s7YKsPDBqBWM%Fw_-)jBt^ TC_OU|$S$Z*Fxbq_?N*U`1oZ#_ diff --git a/searx/static/themes/simple/css/searx-rtl.min.css.map b/searx/static/themes/simple/css/searx-rtl.min.css.map index 94eadb43f0e98ce5803b25a5353be7ff1ebc9dd8..da29229d62580f339d1a60497084bc7c74e27ba0 100644 GIT binary patch delta 172 zcmew{h4I`}#tH2corU>}Qj1G-O5#gWa|?13OHwyhr*H{+yXw0J=_EQjd+PW*Iy&n3 zPHxl}=JEzHEnJ=by*5AP(qrTFa!%H%baHf#n(S|Cw>e6%n~l+X^E2^D^6dJ4UOLG^ z5tHl9(`3AzbwWWJy@Rrx9CZqT>K%0=K?0tE`I8wf%mGQ?E#tH2kw?=TWWxBZ*xdv^v=GJ3l^w^vwc#)0KbF+=aBzg7>e=nWnps>kT z&C_H&opnMT9UXPNgEE{PbqbvvogH-|K?0tExs$^!+`kX=xrV6d5;TfGth__7t; delta 14 VcmaFZ!L+V}X#)rMW@~P>N&qW^1pfd4 diff --git a/searx/static/themes/simple/css/searx.min.css.map b/searx/static/themes/simple/css/searx.min.css.map index b897639a11247c7e737e6d94faf98a21a24fb4a0..315f7e6ed40e12a66419720e68bb2c429c0f1f4a 100644 GIT binary patch delta 175 zcmX>wg>l+c#tH2corU>}Qj1G-O5#gWa|?13OHwyhyL0h)yXw0J=_EQjd+PX4eyc3S z;pnJi;p*(~wfO{>9vh?A=I;U**%-YypA?@Y&#v$1rIQ>KF^NCbCeYhiC)5$B*gGi8 z$x)}!$HY5N5 delta 122 zcmbO>mGQt7#tH2kw_0e=nWnps>k1 z%+q8%opnMT9UXPNgEE{PbqbvvogH-|K?0tExs$Cd