Closed mary060196 closed 5 years ago
Here is what I write on the post. After I click submit, it happens again. I refreshed the page before that. Maybe the issue is with the single quote mark (')?
Yea looks like the ' is breaking it. I'll look into it tomorrow. Thanks
O.K. Thank you very much, @derickfan .
This \ also breaks comments and posts
@LoadingUser3 , your comment is very helpful towards understanding what the issue is about. Since the characters that create problems are ", ' and /, it is believable that the reason for the break is character escaping. In other words, I could build a JS function to add another / before any such character, which would allow the processing of these three. I'll try to do this first in the "Write Post" page to see if the function works, and then if it does on other pages where people can enter any kind of input. Thank you very much for the inspiration!
@mary060196 The / (forward slash) does work for comments and posts, it's the \ (back slash) that does not.
I'm glad that this helps with finding the issue!
Yes, you're right - it's the backslash! The backslash is the one that is used for escaping: \', \" and \. And thank you for checking about the forward-slash as well. Once the function is added, I'll check how posts submit with any keyboard character in them. Thank you so much for this!
I've checked most of them already (at least just for comments) under p/app_hacks, the post named "Check 2".
@LoadingUser3 , that's a great job! The function, then, will address these specific ones. I'd also add escaping for " in any case (that won't hurt the code anyway). Thank you very much!
Here's another weird thing I found (or maybe it's intentional?) involving the Post Title:
The following sentence is 99 characters long:
Checking multiple lines, double space, 12 font, 18 pages, laminated, hard copy due 8-16-2019 @16:15
It will successfully post if I leave it as is in the Post Title field.
If I add any character to it, including a space, it will also post. (100 characters)
If I add something on top of the above else that puts it above 100 characters (two spaces count!), it will not post and the same exact issue as with the ' and \ (page refreshes without submitting, you can no longer choose community).
Is the character limit for Post Titles 100 characters?
Oddly enough, having more than 100 characters of a looping "1234567890" would post.
(Most tests were made under the p/app_hacks, sorry for the mess that's there, hoping for delete posts feature eventually)
Yes, @LoadingUser3 . There's a limit of 100 characters for post titles in the database, which prevents more than 100 chars to be posted.
Just making sure, should probably not let the user go above 100 though.
Thank you for letting me know!
You are right. I'll also add a limitation in JS to disallow more than 100 characters to be inserted. Thank you very much!
@LoadingUser3 , Now every post (title + text) and every comment (both to posts and other comments) can contain the special characters: ', \ , \t, \r, \0, \v, \f just as they are. Try them out, and try many of them in a sequence. Another problem that remains is making new lines, which I'll do tomorrow evening. I'll also add the limitation to post title of 100 char tomorrow. Since this specific issue has been solved, I am closing it, and creating two issues for the issues I mentioned here. Thank you so much for you responsiveness!
Not reproducible. Please provide steps to reproduce this. Closed for now