Game Development Community

Forum Posts -- Stripping out backslashes

by Nathan Martin · in Site Feedback · 02/07/2011 (10:12 am) · 7 replies

Problem Type: Bug

Browser/OS: Firefox 3.6.14 / Windows XP

Problem Description:
Forum, blog, and resource posting content can't contain backslashes as they are being stripped.

Short Examples:
Original line: ChatHud.AddLine( "c4Video Capture [c2" @ $Recordings::VideoCap::CapFile @ "cr] finished.");
Eventually becomes: ChatHud.AddLine( "c4Video Capture [c2" @ $Recordings::VideoCap::CapFile @ "cr] finished.");

Examples cannot even be posted due to the forums being also effected. I originally thought it was just source in code tags, but its definitely effecting all posting content.

Bug Example Link: www.garagegames.com/community/resources/view/20824

Steps to Reproduce Problem:
  1. Post a resource (or a forum post now that I've noticed) with content containing backslashes.
  2. A page with confirmation of resource posting will show original and correct content.
  3. After a while, not immediately and perhaps after a couple of page refreshes (caching?), the content will no longer contain any backslashes as if they were stripped.


#1
02/07/2011 (10:15 am)
Sounds similar to the old "edit" post issue which would also eat slashes.
#2
02/07/2011 (10:24 am)
Confirmed. Logged as GGC-584
#3
02/07/2011 (10:24 am)
Testing with several backslashes for kicks: \ one \\ two \\\ three \\\\ four.
How about forward slashes: / one // two /// three //// four.
#4
02/07/2011 (11:10 am)
/ // ///

edit: all works fine - you've clearly gone mad :P

double edit - no you're sane I just lost a line of backslashes after editing!
#5
02/07/2011 (11:29 am)
This one is actually already logged as GCC-453 and I verified it was still an issue last week. I'll add a link to this thread on it as the original was reported via an unrelated discussion.

Slashes can be posted fine in the code blocks the first time, it's the editing of a post that strips them out.
#6
02/09/2011 (2:58 pm)
probably need php stripslashes, or html entities looked at in the header, it\'ll save time.
#7
04/27/2011 (3:10 pm)
also just wanted to point out that once you have managed to re add your back slashes to your post, if you were then to re-edit the post the editor strips out the slashes again.