Skip to content

Commit

Permalink
Closes #2417: Fix double-encoded publication file URLs.
Browse files Browse the repository at this point in the history
  • Loading branch information
joeparsons committed May 23, 2023
1 parent 9b4e338 commit 4b7a1af
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 4b7a1af

Please sign in to comment.