Project page crashes when having a directory with the "{{name}}" name.

Summary

Initially I wanted to report a bug with the project file viewer not handling directories with the "{{name}}" name (enclosed in double curly braces), and I wanted to created a project to reproduce it. After I created it, it seems that I get a 500 error when I try to go to the project page.

Steps to reproduce

Create a directory with the name "{{anything}}" which contains at least a file and push it to gitlab. After that, go to the project's url.

Example Project

https://gitlab.com/vladcalin/gitlab-bug-report

What is the current bug behavior?

Page crashes.

What is the expected correct behavior?

The usual project view.

Relevant logs and/or screenshots

500
Whoops, something went wrong on our end.
Try refreshing the page, or going back and attempting the action again.

Please contact your GitLab administrator if this problem persists.

I also have a private project which does not crashes, but the directory is not handled properly.

bug1

bug2

Output of checks

This bugs happens on gitlab.com

Results of GitLab environment info

None

Results of GitLab application Check

None

Possible fixes

I have no knowledge of the platform's internals, so I have no suggestion.

Thank you. If I can help with any other information, please let me know.