When inserting an image inside the ckeditor the url output is http://site.com/image/data/004 - Copy.jpg
instead of http://site.com/image/data/004%20-%20Copy.jpg
Keep in mind that images get displayed properly on the site but when I want to send an email the email client (gmail for example) encodes the url file name to http://site.com/image/data/004+-+Copy.jpg
and that returns a 404.
I can fix this with rawurlencode() but I can't seem to find where to add it. Any ideas?
EDIT: I found where to edit (filemanager.tpl)
window.opener.CKEDITOR.tools.callFunction(<?php echo $fckeditor; ?>, '<?php echo $directory; ?>' + $(this).find('input[name=\'image\']').attr('value'));
How do I encode $(this).find('input[name=\'image\']').attr('value')
with rawurlencode?