Commit a6826a53 authored by anon's avatar anon

Fixed #1848056: Insertion of link to unpublished node contains unwanted markup.

parent 5af2c8ca
......@@ -6,17 +6,11 @@
class LinkitPluginNode extends LinkitPluginEntity {
/**
* If we are inclunding unpublished nodes in the search results, and this
* entity is unpublished, we need to tell the user this.
*
* @return a string which will be used as the search result label for this
* item.
* Returns a string which will be used as the search result label for this
* item.
*/
function buildLabel($entity) {
$label = parent::buildLabel($entity);
if ($this->conf['include_unpublished'] && $entity->status == NODE_NOT_PUBLISHED) {
$label .= '<span class="status"> - ' . t('unpublished') . '</span>';
}
return $label;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment