Skip to content

assets_path is broken #10185

Description

@alecpl

This option does not work as expected in 1.7.0. After setting it to some URL static.php will be still used.

Here's an ugly patch:

--- a/program/include/rcmail_output_html.php
+++ b/program/include/rcmail_output_html.php
@@ -960,6 +960,10 @@ class rcmail_output_html extends rcmail_output
             return $this->resource_location($path);
         }
 
+        if (str_contains($this->assets_path, '://') && ($pos = strpos($path, 'static.php/') !== false)) {
+            $path = substr($path, $pos + 10);
+        }
+
         return $this->assets_path . $path;
     }
 

But asset paths handling is a mess in rcmail_output_html. I feel it will need some cleanup/refactoring.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions