Topic: [Bug/Invalid?] Backslash fails to appear in front of square brackets

Posted under Site Bug Reports & Feature Requests

Bug Report Template:
Bug overview description.
I cannot add backslashes on the front of "[".
For me, post #1865461. (compare with source)

What part(s) of the site page(s) are affected?
Post descriptions and comments.

What is the expected behavior?

\ [+]/ without the space.

What actual behavior is given instead?

\[+]/

When edited, it shows ": : esc : : [ : : / esc : : +]/" without the spaces.

Time of incident (if applicable).
n/a

Can you reproduce the bug every time?
Yes.

What steps did you take to replicate this bug?
Just try putting backslash in front of "[".

EDIT: Or even in between quotations as that seems to not work as well.

Errors or other messages returned (if any).
None.

Updated

From your post, it seems like forum posts are also "affected".

\\[+]/

Yeah, the bug seems to be just that you aren't aware of backslash escapes.

\\ escapes whatever character follows (this usually means a character that would otherwise be interpreted in a special way. In the case of e621, that includes [, ], ", {, }, |, and probably a few more). If you want to write a literal \\, you need to use two backslashes.

\\\\ means 'a literal \\'; \\[ means 'a literal ['. Therefore, to write \\[+]/, write \\\\ followed by [+]/

E621 appears to interpret invalid escapes as a series of normal non-escaped characters, for example \n renders simply as \n. This is a common behaviour but is probably why you didn't notice the special behaviour of \\ until now.

Updated by anonymous

I see, thanks for the heads up. I guess that this would not really be considered a bug(?), considering that the site inteprets these unique characters as such.

Updated by anonymous

  • 1