aptonic / dropzone4-actions

Add-on actions and API Docs for Dropzone 4
https://aptonic.com
363 stars 57 forks source link

Dragged text: " replaced by \" (double quotes are escaped) #42

Closed zmwangx closed 9 years ago

zmwangx commented 9 years ago

When I drag text containing double quotes to Dropzone 3, all the double quotes seem to be escaped with a backslash. For instance, consider the following simple action:

def dragged
    $dz.alert("Dragged text:", $items[0])
end

Drag "''" to the action, and the printed text is \"''\". Is this happening by design? (I failed to see how this escaping is useful, and I would expect $items[0] to be a faithful reproduction of the dragged text.)

aptonic commented 9 years ago

Nice find! This is definitely a bug. I have fixed it and the fix will go out with the next release (3.2.4). If you want to try it now, I've made you a build you can run (you'll still be auto-updated to the next major release if you try this version)

You can download this fixed build at: http://shipsomecode.com/misc/Dropzone-3.2.3-Build734.zip

zmwangx commented 9 years ago

Yeah, build 734 works. Thanks for the quick fix.

aptonic commented 9 years ago

Great! Thanks for testing and for a good bug report :smile: