Navigating a directory structure where folders contain spaces

I’d like to navigate an existing directory tree where some of the folders contain spaces.

Unfortunately I can’t rename folders or add text files so I’ll be using the default template to navigate.

The code below works but fails when it hits a folder with spaces.
This leads to kirby’s error page.

Any ideas?


  <?php foreach($page->children() as $subpage): ?>
    <a href="<?php echo $subpage->url() ?>">
      <?php echo html($subpage->title()) ?>
  <?php endforeach ?>

Could this be solved through routing or .htaccess? Or would the kirby core need to be modified?