-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fix handling of image and PDF links with special characters (#84)
Handling of other media files like audio is still broken and not worth the fix right now. From the attached GitHub issue > Aeons ago I made [a blog post](https://habi.gna.ch/2003/07/26/canyoning/) including the image `https://habi.gna.ch/blog/images/Picture(2).jpg` > > When calling `wp2hugo` with > ```bash > ./src/wp2hugo/bin/wp2hugo -source habignach.WordPress.2024-10-29.xml -download-media > ``` > the process fails with > ```bash > 05:33:50PM DBG hugo_gen_setup.go:412 > Embedded media links links=1 page=https://habi.gna.ch/2003/07/26/canyoning/ > 05:33:50PM DBG hugo_gen_setup.go:416 > Downloading media files links=1 > 05:33:50PM INF media_cache_setup.go:33 > media https://habi.gna.ch/blog/images/Picture(2 will be fetched > 05:33:50PM FTL main.go:43 > Error: error fetching media file https://habi.gna.ch/blog/images/Picture(2: error fetching media https://habi.gna.ch/blog/images/Picture(2: 404 Not Found > ``` > > I think the fetching link needs escaping of the parenthesis :) > > `grep "Picture(2" habignach.WordPress.2024-10-29.xml` returns `<a href="http://habi.gna.ch/blog/images/Picture(2).jpg"><img src="http://habi.gna.ch/blog/images/Picture(2)-tm.jpg" height="288" width="352" align="middle" border="2" hspace="0" vspace="0" alt="" longdesc="" /></a><p>` BTW Ref: #81
- Loading branch information
Showing
3 changed files
with
49 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters