From 65ed3818ec0b25d2f2093a08935003a7a07ddb3f Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Thu, 3 Mar 2022 19:29:56 +0100 Subject: Use correct base url for stylesheets and js. Use z_root instead of script_path when formatting stylesheet and javascript links for the head section. script_path does not preserve information about the port if the site uses a nonstandard port. --- include/plugin.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/plugin.php b/include/plugin.php index 25fa22e10..f0ae1ecb1 100644 --- a/include/plugin.php +++ b/include/plugin.php @@ -941,9 +941,7 @@ function head_get_links() { function format_css_if_exists($source) { - // script_path() returns https://yoursite.tld - - $path_prefix = script_path(); + $path_prefix = z_root(); $script = $source[0]; @@ -1054,7 +1052,7 @@ function head_get_main_js() { } function format_js_if_exists($source) { - $path_prefix = script_path(); + $path_prefix = z_root(); if(strpos($source,'/') !== false) { // The source is a known path on the system -- cgit v1.2.3