Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion modules/ting_relation/includes/ting_relation.field.inc
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ function ting_relation_get_abstract($relation) {
break;
}

return empty($abstract) ? FALSE : $abstract;
return empty($abstract) ? FALSE : strip_tags($abstract);
}

/**
Expand All @@ -228,6 +228,7 @@ function ting_relation_get_abstract($relation) {
function ting_relation_get_online_url($relation) {
$url = FALSE;
$title = '';
$external = 'target="_blank"';
switch ($relation->type) {
case 'dbcaddi:hasReview':
case 'dbcaddi:hasSubjectDescription':
Expand All @@ -237,6 +238,7 @@ function ting_relation_get_online_url($relation) {
if (in_array(strtolower($relation->object->getAc_source()), $reservable_sources)) {
$title = t('Read more about the material');
$url = '/ting/object/' . $relation->object->id;
$external = '';
}
else {
$title = t('Read more at %source', array('%source' => $relation->object->getAc_source()));
Expand Down Expand Up @@ -276,6 +278,7 @@ function ting_relation_get_online_url($relation) {
return array(
'url' => $url,
'title' => $title,
'external' => $external,
);
}

Expand Down
2 changes: 1 addition & 1 deletion modules/ting_relation/templates/ting-relation.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* - $title: Relation title string.
* - $abstract: Short description of the relation (from the entities
* description field or abstract field).
* - $online: Array with title and url to more information online.
* - $online: Array with title, url, external to more information online.
* - $fulltext_link: Link to docbook format inserted by ting_fulltext module.
*/
?>
Expand Down