Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature request] /wiki/new - PATH field validation #12

Closed
utkonostracker opened this issue Mar 15, 2023 · 1 comment
Closed

[feature request] /wiki/new - PATH field validation #12

utkonostracker opened this issue Mar 15, 2023 · 1 comment

Comments

@utkonostracker
Copy link

currently the only correct way to fill PATH field is like "/rules" which would properly generate new page

if user would fill it like "rules" the system would give him error "Could not create wiki page: That is not a valid path". this is a bit misleading since there's nowhere said that PATH should start with / symbol
if user would fill it like "/rules/" the system would create the page (so this adress would be taken) but other fields (TITLE and BODY) would not be saved and the pages would not be available for any alteration through the interface

i guess this could minimize negative user experience:

  • make users fill PATH not from "wiki" but from "wiki/" so "rules" or "rules/old" would become correct way to fill PATH field
  • auto trim / symbol in the end of PATH field if user enters it
@tdjsnelling
Copy link
Owner

Added more helpful handling in b6ae74f.

Leading/trailing / will be handled automatically whether the user includes them or not. Paths will also now be formatted properly and stripped of non URL safe characters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants