Sortable: prevent inline javascript contained in <script> tags to be executed on First item drop. Fixed #6951 - Inline script executing on FIRST drop. #572

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
5 participants
@fadomire

Sortable: prevent inline javascript contained in <script> tags to be executed on First item drop. Fixed #6951 - Inline script executing on FIRST drop.

The fix is just using pure javascript instead of jquery to insert dropped item, as $.before() eval any <script> tags and remove it. Instead i used insertBefore() javascript that does not execute or change the html content.

fadomire added some commits Jan 13, 2012

Sortable: prevent inline javascript contained in <script> tags to be …
…executed on First item drop. Fixed #6951 - Inline script executing on FIRST drop.
Sortable: prevent inline javascript contained in <script> tags to be …
…executed on First item drop. Fixed #6951 - Inline script executing on FIRST drop.
@fadomire

This comment has been minimized.

Show comment Hide comment
@fadomire

fadomire Jan 18, 2012

I commited a second time because first fix was just using Jquery object instead of pure Javascript object, which was at the end making the fix useless

I commited a second time because first fix was just using Jquery object instead of pure Javascript object, which was at the end making the fix useless

@jstrimpel

This comment has been minimized.

Show comment Hide comment
@jstrimpel

jstrimpel Apr 5, 2012

I encountered this problem as well thanks to people blurring the back-end and front-end duties {end rant}. A workaround is...

start: function(event, ui) { ui.item.find('script').remove(); }

I encountered this problem as well thanks to people blurring the back-end and front-end duties {end rant}. A workaround is...

start: function(event, ui) { ui.item.find('script').remove(); }

@mikesherov

This comment has been minimized.

Show comment Hide comment
@mikesherov

mikesherov Oct 31, 2012

Member

I recommend closing this pull request as this will be fixed in jQuery core here: http://bugs.jquery.com/ticket/11795

Member

mikesherov commented Oct 31, 2012

I recommend closing this pull request as this will be fixed in jQuery core here: http://bugs.jquery.com/ticket/11795

@0flav

This comment has been minimized.

Show comment Hide comment
@0flav

0flav Jan 16, 2013

Hello!
Now it's fixed in jQuery core, but the problem persist...
Are you going to open this ticket again?
Bye.

0flav commented Jan 16, 2013

Hello!
Now it's fixed in jQuery core, but the problem persist...
Are you going to open this ticket again?
Bye.

@mikesherov

This comment has been minimized.

Show comment Hide comment
@mikesherov

mikesherov Jan 18, 2013

Member

@0flav please submit a bug report proving it still exists at bugs.jqueryui.com

Member

mikesherov commented Jan 18, 2013

@0flav please submit a bug report proving it still exists at bugs.jqueryui.com

@0flav

This comment has been minimized.

Show comment Hide comment
@0flav

0flav Jan 18, 2013

I mean they really fix it, but not as you are waiting for.
They just prefer to keep first execution.
So they fix their ticket, but they simply don't choice the way allowing to automatically fix yours.
Damage : /

At the end of the jquery ticket it's written :
Resolution set to fixed, keep scripts in DOM; execute only on first insertion.

Maybe i don't understand clearly the problem cause i don't understand english very well...
Is it works for you?

0flav commented Jan 18, 2013

I mean they really fix it, but not as you are waiting for.
They just prefer to keep first execution.
So they fix their ticket, but they simply don't choice the way allowing to automatically fix yours.
Damage : /

At the end of the jquery ticket it's written :
Resolution set to fixed, keep scripts in DOM; execute only on first insertion.

Maybe i don't understand clearly the problem cause i don't understand english very well...
Is it works for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment