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. 16
      plugins/FormBuilder.inc

16
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,7 +221,12 @@ 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);

Loading…
Cancel
Save