From 46e131fdadd94910c0e258aa4e855ad8019edbf7 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Mon, 7 Feb 2022 16:16:57 +0100 Subject: [mod] result_templates/videos.html: replace embedded HTML by data_src Embedded HTML breaks SearXNG architecture. To modularize, HTML is generated in the templates (oscar & simple) and result parameter 'embedded' is replaced by 'data_src', an URL for embedded content (' - ) # return empty array if there are no results if "data" not in search_res: return [] @@ -72,7 +66,6 @@ def response(resp): content = "" thumbnail = sanitized_url + res["thumbnailPath"] publishedDate = datetime.strptime(res["publishedAt"], "%Y-%m-%dT%H:%M:%S.%fZ") - embedded = embedded_url.format(embed_path=res["embedPath"]) results.append( { @@ -81,7 +74,7 @@ def response(resp): "title": title, "content": content, "publishedDate": publishedDate, - "embedded": embedded, + "data_src": sanitized_url + res["embedPath"], "thumbnail": thumbnail, } ) -- cgit v1.2.3