simply-static
simply-static copied to clipboard
Issue Replacing URLs For Offline Usage
An issue is occurring while replacing urls for offline usage. During export, it will prematurely return if the current path only partially matches the extracted path. The error appears to be occurring in Util::create_offline_path function in class-ss-util.php.
Example: The extracted path “http://example.com/product-category/widgets/“ on a page with the path “http://example.com/product/widget-100/“
will result in the relative path “./../-category/widgets/“ instead of “./../../product-category/widgets/“
Changing the comparison “strpos( $extracted_path, $page_path ) === 0” To “strpos( $extracted_path, $page_path . ‘/’ ) === 0” appear to fix the above case but probably is not the best solution.