diff --git a/includes/locale.inc b/includes/locale.inc index c168da0..710588b 100644 --- a/includes/locale.inc +++ b/includes/locale.inc @@ -1485,7 +1485,12 @@ function _locale_parse_js_file($filepath) { $parsed_url = drupal_parse_url($filepath); $filepath = $parsed_url['path']; // Load the JavaScript file. - $file = file_get_contents($filepath); + if (file_uri_scheme($filepath) === FALSE) { + global $base_url; + $filepath = $base_url . '/' . $filepath; + } + // Prefering drupal_http_request() to file_get_contents(). + $file = drupal_http_request($filepath)->data; // Match all calls to Drupal.t() in an array. // Note: \s also matches newlines with the 's' modifier.