Go Back   CodingForums.com > :: Other forums > Forum feedback and announcements

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rating: Thread Rating: 2 votes, 2.00 average.
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-03-2012, 09:12 AM   PM User | #1
Philip M
Supreme Master coder!

 
Philip M's Avatar
 
Join Date: Jun 2002
Location: London, England
Posts: 17,103
Thanks: 197
Thanked 2,421 Times in 2,399 Posts
Philip M has a spectacular aura aboutPhilip M has a spectacular aura aboutPhilip M has a spectacular aura about
Something wrong with copy from text in code tags.

Something seems to have gone wrong with the site.


When I copy code within code tags, for example at
http://www.codingforums.com/showthread.php?t=280407
I get

<script type = "text/javascript"> String.prototype.isValidDate = function(){ var arrParts = this.split("/"); var date1 = new Date(this.toString()); dtReturn = (date1.getMonth()+1 == parseInt(arrParts[0],10) && date1.getDate() == parseInt(arrParts[1],10) && date1.getFullYear() == parseInt(arrParts[2],10) ); return dtReturn; // true or false } var strDate1 = "01/31/2012"; // USA date format var strDate2 = "2/31/2012"; alert(strDate1 + ": " + strDate1.isValidDate()); alert(strDate2 + ": " + strDate2.isValidDate()); </script>
Read more at http://www.codingforums.com/showthre...85cu8q5lqo7.99

Note that the newlines are lost and a message about "read more" is appended.

Is this something to do with Facebook/Twitter? It is an annoying glitch!
__________________

All the code given in this post has been tested and is intended to address the question asked.
Unless stated otherwise it is not just a demonstration.
Philip M is offline   Reply With Quote
Old 11-09-2012, 08:52 AM   PM User | #2
abduraooft
Supreme Master coder!

 
abduraooft's Avatar
 
Join Date: Mar 2007
Location: N/A
Posts: 14,689
Thanks: 158
Thanked 2,184 Times in 2,171 Posts
abduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really nice
Any follow up on this? Or is it a new feature ?
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)
abduraooft is offline   Reply With Quote
Old 11-09-2012, 03:27 PM   PM User | #3
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,751
Thanks: 4
Thanked 2,468 Times in 2,437 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
I noticed this too; started up about a week ago. I copy from mainly PHP tags and I don't believe I loose the linefeeds, I'll have to try on code ones too.
Its a little annoying I have to admit yeah. I would suggest that the way to fix it is to either remove it completely or make it so the paste doesn't apply that line if pasted back into codingforums.com. I'm not sure where it comes from, so masmedia is looking into any of the new functionality added to see if it could include that.
Fou-Lu is offline   Reply With Quote
Old 11-14-2012, 08:41 AM   PM User | #4
Philip M
Supreme Master coder!

 
Philip M's Avatar
 
Join Date: Jun 2002
Location: London, England
Posts: 17,103
Thanks: 197
Thanked 2,421 Times in 2,399 Posts
Philip M has a spectacular aura aboutPhilip M has a spectacular aura aboutPhilip M has a spectacular aura about
It is the loss of the line breaks which is the biggest annoyance. That will cause significant problems for newcomers who are trying to copy and paste code into their own pages. Not user-friendly!

As you say, it dos not happen with php tags, so why does it happen with Javascript code tags? It must be a coding error. Please fix it soon - whoever did it managed to introduce this glitch into the forum up within hours, so why can he not put it right in hours?
__________________

All the code given in this post has been tested and is intended to address the question asked.
Unless stated otherwise it is not just a demonstration.

Last edited by Philip M; 11-14-2012 at 08:45 AM..
Philip M is offline   Reply With Quote
Old 11-15-2012, 06:47 PM   PM User | #5
Philip M
Supreme Master coder!

 
Philip M's Avatar
 
Join Date: Jun 2002
Location: London, England
Posts: 17,103
Thanks: 197
Thanked 2,421 Times in 2,399 Posts
Philip M has a spectacular aura aboutPhilip M has a spectacular aura aboutPhilip M has a spectacular aura about
It looks as though this problem has now been resolved!
__________________

All the code given in this post has been tested and is intended to address the question asked.
Unless stated otherwise it is not just a demonstration.
Philip M is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:17 PM.


Advertisement
Log in to turn off these ads.