Commit 5983d9e8 authored by jcnventura's avatar jcnventura

Fix #835814 and #451408 by kingandy: use #prefix and #suffix for the content corner span

parent 3ebbb392
......@@ -340,14 +340,13 @@ function print_node_view($node, $build_mode) {
if ($build_mode == 'full') {
// Insert content corner links
$node->content['print_links'] = array(
'#markup' => "<span class='print-link'></span>",
'#prefix' => '<span class="print-link">',
'#markup' => '',
'#suffix' => '</span>',
'#weight' => -101,
);
if (!empty($print_html_link_pos['corner'])) {
$link = print_insert_link(NULL, $node);
if ($link) {
$node->content['print_links']['#markup'] = preg_replace('!</span>$!', $link . '</span>', $node->content['print_links']['#markup']);
}
node->content['print_links']['#markup'] .= print_insert_link(NULL, $node);
}
}
}
......
......@@ -180,10 +180,7 @@ function print_mail_node_view($node, $build_mode) {
// Insert content corner links
if (!empty($print_mail_link_pos['corner']) && ($build_mode == 'full')) {
$link = print_mail_insert_link(NULL, $node);
if ($link) {
$node->content['print_links']['#markup'] = preg_replace('!</span>$!', $link . '</span>', $node->content['print_links']['#markup']);
}
$node->content['print_links']['#markup'] .= print_mail_insert_link(NULL, $node);
}
}
......
......@@ -228,10 +228,7 @@ function print_pdf_node_view($node, $build_mode) {
// Insert content corner links
if ((!empty($print_pdf_link_pos['corner'])) && ($build_mode == 'full')) {
$link = print_pdf_insert_link(NULL, $node);
if ($link) {
$node->content['print_links']['#markup'] = preg_replace('!</span>$!', $link . '</span>', $node->content['print_links']['#markup']);
}
$node->content['print_links']['#markup'] .= print_pdf_insert_link(NULL, $node);
}
}
......
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