Forum Thread
Broken Heart (Literally) in Comments/Forums
Forum-Index → Bug Reports → Resolved → Broken Heart (Literally) in Comments/ForumsHowever, I just posted a "</3" on Ilima's feed auctioning some art they did, and the whole back half of the comment disappeared. The broken heart and anything after it was gone. I made a test feed (still on my profile) and took screenshots of this happening.
Testing if <3 would break it like it sometimes does
No dice. It worked normally. Maybe it was just a weird incident, then.
Testing if [broken heart] would break it like it just had
Oh, it did break with this one. Let's do it again with more documenting of the process and to see if it's still just a coincidence or rare thing.
Testing it again, but this time screenshotting the feed before I post it
Result of the last test
It still broke.. Weird.
UPDATE AS I WAS MAKING THIS THREAD:
It would appear that the broken heart also messes with some of the [] [/] coding, as seen in these screenshots:
As you can see here, my coding should be fine (unless I'm blind and missing it- this is completely possible)
However, when I previewed it, after the broken heart got all messed up
To resolve the issue for posting purposes, I removed the
[u][/u]
I was planning to use.ANOTHER MID-POST WRITING EDIT: Even removing the coding didn't fix it.
I'm not sure why this is happening, since I feel like people have posted the broken heart before. I'm sure I have.
I have to go to work for about 7 hours, but if others could continue testing this for me and contributing their finds to the thread, I would really appreciate it. I know a few others have posted broken hearts on my feed because I'd asked, and I testing one in the PalPad and it didn't do anything unusual.
I don't know if this will help, but I am currently using a laptop. I don't know if anything different might happen for mobile.
add_comment.php is bugged, it (most likely) does the following:
#1: Read your text (aka TEXT)
#2: Encodes TEXT for security (aka ENCODED)
#3: Saves ENCODED in database
#4: Returns TEXT to show on your screen
The problem here is that TEXT is returned and not ENCODED. The fact
that you used </ in your text is why it broke, without encoding
everything you type is seen as code and </ is invalid code so it
crashed (or something?) after that.#2: Encodes TEXT for security (aka ENCODED)
#3: Saves ENCODED in database
#4: Returns TEXT to show on your screen
It works again after you reload because then show_comments.php is called:
#1: Read the database for comments, ENCODED
was stored in the database so that is what's being read (aka
ENCODED)
#2: Returns ENCODED so the comments show correctly as text
Here you only have the encoded text which is always seen as text,
so it's impossible to break the rest of the code.#2: Returns ENCODED so the comments show correctly as text
Knowing this, I think there are two ways this can break:
#1: Bad connection; add_comment.php works but for some reason show_comments.php didn't come through. I was able to recreate this by blocking show_comments.php altogether, simulating a slow connection did only delay the correct text, so for connection to be the cause it would have to be a really unstable connection I guess.
#2: Breaking code after "invalid code"; at the end of the response of add_comment.php there's a little script with showComments('2018- etc. (as seen in your images too). This script usually executes show_comments.php which then shows the correct text. According to your images this script is somehow changed into text, most likely due to the invalid code. I however was not able to recreate this but I still think this is what you had.