Closed Bug 764426 Opened 12 years ago Closed 12 years ago

Disallow slashes in document slug field in forms

Categories

(developer.mozilla.org Graveyard :: Editing, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: lorchard, Unassigned)

References

Details

(Whiteboard: u=user c=wiki s=2012-07-03 p=1 t=2012-07-09)

Slashes in page URLs are significant in the parent / child relationship in the document hierarchy. So, as part of field validation, slashes should be disallowed in the editable portion of document editing forms.

So, a document at /en-US/docs/CSS/CSS_Reference/Foo should allow the "Foo" part to be edited. But, if a submission changes "Foo" to "Foo/Bar", that should be rejected by form validation.

For bonus points: Not sure how to finesse this, UI-wise, but a slug edit of "Foo/Bar" probably means the user wants to create a sub-page. Maybe we can word the error message or somehow guide the user toward the sub-page creation feature?
Depending on bug 764431, this bug may be a moot point for editing if slug changes get changed to a more formal "Move this page" command. We should at least disallow slashes in the slug for a newly created page.
Whiteboard: u=user c=wiki s=2012-07-03 p=
Whiteboard: u=user c=wiki s=2012-07-03 p= → u=user c=wiki s=2012-07-03 p=1
Commits pushed to master at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/0779d6c1ea407b454487bd44ab6e0012f4de0164
fix bug 764426 - Prevent slashes in slugs from form

https://github.com/mozilla/kuma/commit/6459cc10014a5475f9708b50897cfc7e51e6b07d
Merge pull request #273 from darkwing/disallows-slashes-slug-764426

fix bug 764426 - Prevent slashes in slugs from form
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: u=user c=wiki s=2012-07-03 p=1 → u=user c=wiki s=2012-07-03 p=1 t=2012-07-09
Version: Kuma → unspecified
Component: Docs Platform → Editing
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.