Skip to content

Commit

Permalink
Closes #2417: Fix double-encoded publication file URLs. (#2430)
Browse files Browse the repository at this point in the history
  • Loading branch information
joeparsons authored May 24, 2023
1 parent a4ddd68 commit 7817efa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/custom/az_publication/az_publication.module
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,9 @@ function az_publication_node_view(array &$build, EntityInterface $entity, Entity
}
// Handle file link if available.
if (!empty($entity->field_az_publication_media->entity->field_media_az_document->entity)) {
$blob->itemlink = $entity->field_az_publication_media->entity->field_media_az_document->entity->createFileUrl(TRUE);
// @todo Remove urldecode() if we figure out a better way to prevent
// encoded URLs from getting double-encoded by CiteProc.
$blob->itemlink = urldecode($entity->field_az_publication_media->entity->field_media_az_document->entity->createFileUrl(TRUE));
}

$additionalLinks = [];
Expand Down

0 comments on commit 7817efa

Please sign in to comment.