Massive-Wiki / massivewikibuilder

Massive Wiki Builder
MIT License
3 stars 3 forks source link

File Names with 80% make broken links #54

Open JNicholasOne opened 7 months ago

JNicholasOne commented 7 months ago

This appears to be a problem with "%", it's not getting URL-encoded or something.

band commented 6 months ago

An example would help. Assuming the issue is "%" appearing in a file name, one way to work with this is to replace the "%" with "_" in the html_path. This replacement is now done with the following characters: " ","?","#".

Is this acceptable?

band commented 6 months ago

here is an confusing observation: I made a wiki page in Obsidian named "# the 80% good enough claim". I built the website locally and the URL: "http://localhost:8000/Link_workbench/the_80%_good_enough_claim.html" is accessible in local browsers. However, that same web page fails once the website is built using Netlify. So, what is going on here?

I think PK is right; the URL needs to be encoded. But the difference between localhost and netlify hosting is puzzling.

peterkaminski commented 6 months ago

@band, you've got the right solution:replace the "%" with "_" in the html_path (and collapsing repeated underscore characters to one), since we're already doing that for other characters.

For the local/web difference, offhand I'd guess the Python mini HTTP server isn't urldecoding the URL, while the Netlify HTTP server is. Or something like that. Interesting, but not surprising.