From f50a91f25320041474825f913a127e0c618dc8f1 Mon Sep 17 00:00:00 2001 From: dooug Date: Wed, 30 Jul 2014 15:13:07 -0400 Subject: [PATCH] Issue #1249486 by dooug: Avoid double escaped file url on generic file display. --- filefield_formatter.inc | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/filefield_formatter.inc b/filefield_formatter.inc index 70e3106..5742ff8 100644 --- a/filefield_formatter.inc +++ b/filefield_formatter.inc @@ -121,12 +121,7 @@ function theme_filefield_file($file) { return l($file['filename'], $path); } else { - // We need to manually URL encode links to files if using the public - // downloads method. file_create_url() encodes private downloads. - if (variable_get('file_downloads', FILE_DOWNLOADS_PUBLIC) == FILE_DOWNLOADS_PUBLIC) { - $path = drupal_urlencode(str_replace('\\', '/', $path)); - } - $url = file_create_url($path); + $url = file_create_url(field_file_urlencode_path($path)); } $icon = theme('filefield_icon', $file); -- 1.8.5.2 (Apple Git-48)