Topic: [Bug/Fixed] Creating new wiki pages from tags with ampersands do not add all characters properly

Posted under Site Bug Reports & Feature Requests

Bug overview description.

When creating a new wiki page from a tag that contains an ampersand (&), the page name field only automatically adds in the characters before the ampersand. (e.g. character_(disambig_&_disambig) is filled in as character_(disambig_) This can cause misspelled wiki pages to be accidentally created if the user does not notice. This bug happens only from clicking the link in the "This page does not exist. Click here to create it." message on the non-existent wiki page; clicking on "Edit" in the sub-navbar on top of the page does not cause this.

What part(s) of the site page(s) are affected?

The new wiki page editor, specifically from a tag with an ampersand in it.

What is the expected behavior?

The whole tag is added to the page name field when creating a new page.

What actual behavior is given instead?

Only the characters before the ampersand are added to the page name field.

Time of incident (if applicable).

This actually happened with a number of tags with ampersands recently, but the most recent incident for me happened at approximately 2:15 AM EDT on August 26, 2018.

Can you reproduce the bug every time?

Yes.

What steps did you take to replicate this bug?

  • From the wiki, go to any tag with an ampersand that doesn't have a wiki page. (e.g. tom_(tom_&_jerry))
  • Click on the "Click here" link in the default "page does not exist" message.
  • On the new page editor, the page name field is filled in with tom_(tom_.

Errors or other messages returned (if any).

None. However, I do notice a difference in my browser's address bar when editing a new page depending on whether I clicked on "Click here" in the "page does not exist" message or "Edit" in the sub-navbar. Using the same tom_(tom_&_jerry) example:

  • Clicking on "Edit" (which does not cause the bug) takes me to the URL: https://e621.net/wiki/new?title=tom_(tom_%26_jerry) (Note the percent-encoding there.)
  • Clicking on "Click here" (which causes the bug) takes me to the URL: https://e621.net/wiki/new?title=tom_(tom_&_jerry)
  • 1