Skip to content

Commit

Permalink
Merge pull request #1289 from tripal/1288-tv3-web-services
Browse files Browse the repository at this point in the history
Issue 1288 use the regex used by handleRequest()
  • Loading branch information
spficklin committed Aug 12, 2022
2 parents c049e28 + dc9f292 commit 5d2e39a
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,8 @@ class TripalContentService_v0_1 extends TripalWebService {
$item_entity = tripal_load_entity($item_etype, [$item_eid]);
$item_entity = reset($item_entity);
$bundle = tripal_load_bundle_entity(['name' => $item_entity->bundle]);
$items['@id'] = $this->getServicePath() . '/' . urlencode($bundle->label) . '/' . $item_eid;
$label = preg_replace('/[^\w]/', '_', $bundle->label);
$items['@id'] = $this->getServicePath() . '/' . urlencode($label) . '/' . $item_eid;
$items['@type'] = $bundle->accession;
}
unset($items['entity']);
Expand Down

0 comments on commit 5d2e39a

Please sign in to comment.