elementor / elementor/wp2static

Spaces in URL file asset results in 404, file not copied over during Crawl

Open
#609 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
PHP
Stars
1.5k
Forks
294
PR merge metrics
No merged PRs in 30d

Description

In ```7.0-alpha-007```, I have some file assets under ```wp-uploads``` containing spaces, e.g. ```spaces are bad.jpg```, resulting in a 404 response during the crawl; subsequently, those files aren't copied over to the ```wp2static-crawled-site``` folder.

Not sure if it's the best place/method to handle it, but modifying ```Crawler->crawlUrl()``` at line 185 resolves the issue:

```diff
+ $encoded_url = str_replace(' ', '%20', $url);
+
+ $response = $this->request->getURL( $encoded_url, $handle );
- $response = $this->request->getURL( $url, $handle );
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.