Browse Source

ISLANDORA-153When uploading a file with an & in it ... ingest breaks

pull/105/head
Alexander O'Neill 14 years ago
parent
commit
06fcef3f4f
  1. 18
      plugins/FormBuilder.inc

18
plugins/FormBuilder.inc

@ -179,7 +179,14 @@ class FormBuilder {
if (!empty( $file)) {
$dformat = $mimetype->getType($file);
$fileUrl = $base_url . '/'. drupal_urlencode($file);
$parts = explode('/', $file);
foreach ($parts as $n => $part) {
$parts[$n] = rawurlencode($part);
}
$path = implode('/', $parts);
$fileUrl = $base_url . '/' . $path;
$beginIndex = strrpos($fileUrl, '/');
$dtitle = substr($fileUrl, $beginIndex + 1);
$dtitle = urldecode($dtitle);
@ -214,8 +221,13 @@ class FormBuilder {
}
$dformat = $mimetype->getType($createdFile);
$fileUrl = $base_url . '/'. drupal_urlencode($createdFile);
$parts = explode('/', $createdFile);
foreach ($parts as $n => $part) {
$parts[$n] = rawurlencode($part);
}
$path = implode('/', $parts);
$fileUrl = $base_url . '/' . $path;
$beginIndex = strrpos($fileUrl, '/');
$dtitle = substr($fileUrl, $beginIndex + 1);
$dtitle = urldecode($dtitle);

Loading…
Cancel
Save