maned/goblin

Page URL can't contain '/'

Closed this issue · 5 comments

As of now, if you create a page with '/' in it, then it wont be able to be displayed.

This is because of how the routes and databases are aligned (line 64 of index.js) -- sub directories are recognized because it gets confused.

I'm unsure as to whether to proceed with blocking these characters or enabling them -- later, with nested navigation, we will probably have to build a grander scheme for allowing nested navigations.

For now, let's just disabled the entering of '/' in page routes.

is this still a bug?

Just tested:

I think the fix escapes the '/' but when you actually try and make a page with a '/' in the url and visit it in a running instance, it doesn't work and defaults to 'index.html'. Also, when you go to edit the page, you see the '%20' in the url name. Maybe we can just do validation on the client-side to not allow this?

validation should be done on both sides for everything that needs validation, client side validation is just less server traffic.

agreed

Added client-side validation with server-side as @SotiriosVrachas suggested.