Bug Tracker

Modify

Ticket #8602 (closed bug: invalid)

Opened 2 years ago

Last modified 2 years ago

suggestion for clone property

Reported by: arunjayaraj Owned by: arunjayaraj
Priority: undecided Milestone: 1.next
Component: unfiled Version: 1.5.1
Keywords: Cc:
Blocking: Blocked by:

Description

Hi, I don't know is it a bug . Now I send it as suggestion. I found this in 1.4.2 version. By using clone property we can clone the content of a <div> and we can append these to another <div>.After we getting the data from the code behind we got the data as comma(,) separated for repeated controls ,but in the case of text area or text box there is a chance for data with comma(,) in such cases that generates problem.Is there any solution for this

Change History

comment:1 Changed 2 years ago by ajpiano

  • Owner set to arunjayaraj
  • Status changed from new to pending

It's relatively unclear what you're asking about here, can you try explaining in more detail or providing a code sample? Thanks.

comment:2 Changed 2 years ago by Yomodo

I think what he means is the same issue when you're parsing a .csv (comma seperated value) file.

The .csv file contains:

data1, data2, data3, ...

But if the .csv file contains:

da,ta, data2, dat,3, ...

It will break the parsing of the .csv file, because of the extra , in the data-strings.

This can be prevented by entering the data as:

"da,ta", "data2,"dat,3", ...

By surround the actual data-strings in quotes, parsing will always succeed.

comment:3 Changed 2 years ago by anonymous

"da,ta", "data2,"dat,3", ... should of course be:

"da,ta", "data2" ,"dat,3", ...

comment:4 Changed 2 years ago by addyosmani

  • Status changed from pending to closed
  • Resolution set to invalid

Thanks for submitting a ticket to the jQuery Bug Tracker. As mentioned by Yomodo, the easiest workaround for this issue is just ensuring that your CSV files being have been correctly formatted for your needs prior to usage to avoid issues. I can't see anything jQuery-core specific here that we should be doing to make this process easier, but the solution above should assist.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.