Psycho Posted July 31, 2009 Share Posted July 31, 2009 I think this just started happening recently - at least I didn't notice it before. When editing a post where characters are escaped, the left backslash is removed from the text when the post is opened for editing. The result is that if you make a change to a post and don't put the backslashes back in, the new post will be in error. Example: I create a post such as this (everything dislayes fine) Sample Code: echo "<a href=\"somepage.php\">Go</a>" However, if I then go to edit that post, this is what is displayed in the textarea field (note backslashes are gone): Sample Code: [code=php:0]echo "<a href="somepage.php">Go</a>" [/code] If I make changes and don't put the backslashes back in the new post will look like this (incorrect): Sample Code: echo "<a href="somepage.php">Go Now</a>" Edit: updated link text Quote Link to comment Share on other sites More sharing options...
zq29 Posted July 31, 2009 Share Posted July 31, 2009 echo "<div id=\"foo\">bar</div>"; EDIT echo "<div id=\"foo\">bar</div>"; EDIT AGAIN Works for me... Quote Link to comment Share on other sites More sharing options...
Psycho Posted July 31, 2009 Author Share Posted July 31, 2009 echo "<div id="foo">bar</div>"; Initial save with IE: OK Edit with IE: Backslashes lost --Correct backslashes Save with FF:OK Edit with FF: Backslashes lost Hmm, not sure what is different between you and I, but I am consistently losing the backslashes when the text is populated into the text area when I use the option to edit. Edit: Getting the same results on a different PC Quote Link to comment Share on other sites More sharing options...
nrg_alpha Posted July 31, 2009 Share Posted July 31, 2009 I think this just started happening recently - at least I didn't notice it before. When editing a post where characters are escaped, the left backslash is removed from the text when the post is opened for editing. The result is that if you make a change to a post and don't put the backslashes back in, the new post will be in error. Welcome to my world.. I have brought this up before in this forum (seems hard to reproduce for some people?). I have posting issues all the time in Chrome (but funny, it wasn't an issue a month ago (give or take a few weeks). I tested post previewing in Chome, and many problems.. in Firefox, not so much (but not perfect). I then dowloaded and installed Opera 10 Beta 2. Flawless.. so now when I post code, I tend to do it from Opera instead of Chrome / firefox. But just to make sure, I used Chrome and Firefox in other websites to preview code snippets.. no issues at all.. so it is this site that is causing this for sure. So if you want flawless issues, try Opera 10. EDIT - My thread about the issues are here:http://www.phpfreaks.com/forums/index.php/topic,258343.0.html Quote Link to comment Share on other sites More sharing options...
zq29 Posted July 31, 2009 Share Posted July 31, 2009 My initial test in this thread was done within Safari on the Mac, testing now in FireFox 3 under Ubuntu, though this sounds more like a server-side issue. <?php echo "<div id=\"foo\">bar</div>"; ?> echo "<div id=\"foo\">bar</div>"; EDIT: Still works OK for me. Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted July 31, 2009 Share Posted July 31, 2009 Are you using the quick edit or full edit? Quote Link to comment Share on other sites More sharing options...
zq29 Posted July 31, 2009 Share Posted July 31, 2009 Heh, I didn't even know that quick edit button existed. I'll be using that from now on! (Both work fine for me though) Quote Link to comment Share on other sites More sharing options...
nrg_alpha Posted July 31, 2009 Share Posted July 31, 2009 For me, I use 'Preview' (I'm not sure I follow with the quick edit.. perhaps like SA, it might not be something I don't know of tbh). Quote Link to comment Share on other sites More sharing options...
Psycho Posted July 31, 2009 Author Share Posted July 31, 2009 I am experiencing this with the "Modify" link that appears at the top-right of a post after you post an item (right next to the quote link). I agree this sounds like a server-side issue as the client would have nothing to do with the text that get's populated into the text area when the user selects to edit a post. echo "<a href=\"test.php\">Link</a>"; Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted July 31, 2009 Share Posted July 31, 2009 See screenshot. [attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
Psycho Posted July 31, 2009 Author Share Posted July 31, 2009 OK, this ONLY happens for me when using the "full" modify link - it does not happen when I use the "quick" modify link. Quote Link to comment Share on other sites More sharing options...
nrg_alpha Posted July 31, 2009 Share Posted July 31, 2009 Ah, you meant 'Modify'.. here I was looking for explicitly the 'quick edit' button... I'll test that in a minute.. for me, the problem (missing backslahses) occur when dealing with previewing.. I don't think there is an issue if I go straight from Quick Reply to Post. Testing: echo (preg_match('#^w+$#', $str3))? $str3 . ' passes regex w!' . "<br /> ": $str3 . ' does NOT pass ctype_digit()' . "<br /> "; EDIT- Modifying does wipe out backslashes for me... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.