Problem inserting file

bipster / 2013-02-21 08:19:44   

Hi!

I've found a bug in the "Insert file" function of the "Edit" window. Steps to reproduce:

1. Upload a PDF with single quotes in its filename
2. Click "Insert file"

Example:

domain.com/files/… a PDF.pdf', 'It's a PDF', 1); return false;" class='inserter'>Insert file

Firebug returns a "SyntaxError: missing ) after argument list" error pointing at the "It's"

It seems that some escaping is needed here.

bipster / 2013-02-21 08:22:29   

Sorry, this is the correct example:

<a href="#" onClick="parent.ModInsFile('domain.com/files/… a PDF.pdf', 'It's a PDF', 1); return false;" class='inserter'>Insert file</a>

This thread has been closed, thank you.