Index: modules/upload.module =================================================================== RCS file: /cvs/drupal/drupal/modules/upload.module,v retrieving revision 1.13.2.3 diff -u -r1.13.2.3 upload.module --- modules/upload.module 29 Dec 2004 23:03:20 -0000 1.13.2.3 +++ modules/upload.module 28 Jan 2005 16:05:35 -0000 @@ -232,15 +232,16 @@ // replacement from temporary to permanent URLs. That way, the author // can use the final URL in the body before having actually saved (to // place inline images for example). - if (!variable_get('clean_url', 0)) { + if (!variable_get('clean_url', 0) || variable_get('file_downloads', FILE_DOWNLOADS_PUBLIC) == FILE_DOWNLOADS_PRIVATE) { foreach ($previews as $file) { - $old = file_create_filename($file->filename, file_create_path()); - $new = url($old); + $old = file_create_url(file_create_filename($file->filename, file_create_path())); + $old = str_replace('&', '&', $old); + $new = url(file_create_filename($file->filename, file_create_path())); $node->body = str_replace($old, $new, $node->body); $node->teaser = str_replace($old, $new, $node->teaser); } } - + $teaser = $arg; // Add the attachments list if (count($rows) && !$teaser) {