sbrl / Pepperminty-Wiki

A wiki in a box
https://peppermint.mooncarrot.space/
Mozilla Public License 2.0
180 stars 22 forks source link

Pages with special characters in their names break the search results page #114

Closed sbrl closed 6 years ago

sbrl commented 7 years ago

If I include special characters in a pages name (such as é for example), it causes a nasty warning to show up if they appear in the search results:

Warning
: file_get_contents(/path/to/data/.md): failed to open stream: No such file or directory in
/path/to/root/www/index.php
on line
2294
sbrl commented 7 years ago

This needs some serious investigation. I have no idea what's going on here!

sbrl commented 7 years ago

This looks like it's related to #99, but it's not.

sbrl commented 7 years ago

Aaaaahhhhhh. I think I may have figured it out. The problem lies in the fact that the conventional string manipulation functions do not support unicode characters - so we need to use mbstring instead. It looks like a huge task!

At the very least we should use the mbstring functions from now on.

sbrl commented 6 years ago

Fixed! I've learnt a lot about utf8 whilst fixing this one.....

We'll have to comb over the rest fo the codebase to replace any remaining str_replace() calls - as it doesn't support utf8 :-(