diff --git a/print.module b/print.module index 6539f1610a4436592fb156b72fc9a7be5ec50647..02510cfe7fc1d0b47e5c9cd82d058b54f4de3bc5 100644 --- a/print.module +++ b/print.module @@ -716,7 +716,7 @@ function print_insert_link($path = NULL, $node = NULL) { } else { if ($path === NULL) { - $nid = preg_replace('!^node/!', '', $_GET['q']); + $nid = preg_replace('!^node/([\d]+)!', '$1', $_GET['q']); $path = $_GET['q']; } else { diff --git a/print.pages.inc b/print.pages.inc index b5dcd0a9f60b9294f3b39e09ded74d828d0a03db..ba7cc79108a6deeba968367fc1fca93db1761704 100644 --- a/print.pages.inc +++ b/print.pages.inc @@ -80,7 +80,7 @@ function print_controller($path, $cid = NULL, $format = PRINT_HTML_FORMAT, $teas $path = $alias; } $parts = explode('/', $path); - if (($parts[0] == 'node') && (count($parts) > 1)) { + if (($parts[0] == 'node') && (count($parts) > 1) && ctype_digit($parts[1])) { array_shift($parts); $path = implode('/', $parts); } diff --git a/print_mail/print_mail.module b/print_mail/print_mail.module index 2df0218149c409849301be745b42cabe44b8b15b..683148b8bf55665d758cea36304d482d7d401b03 100644 --- a/print_mail/print_mail.module +++ b/print_mail/print_mail.module @@ -392,7 +392,7 @@ function print_mail_insert_link($path = NULL, $node = NULL) { } else { if ($path === NULL) { - $nid = preg_replace('!^node/!', '', $_GET['q']); + $nid = preg_replace('!^node/([\d]+)!', '$1', $_GET['q']); $path = $_GET['q']; } else { diff --git a/print_pdf/print_pdf.module b/print_pdf/print_pdf.module index 170ac4e2b1dc2b538525865860d4dc3a807c2b26..c370512ff98004083f8dd6b78da14a4e5383b711 100644 --- a/print_pdf/print_pdf.module +++ b/print_pdf/print_pdf.module @@ -477,7 +477,7 @@ function print_pdf_insert_link($path = NULL, $node = NULL) { } else { if ($path === NULL) { - $nid = preg_replace('!^node/!', '', $_GET['q']); + $nid = preg_replace('!^node/([\d]+)!', '$1', $_GET['q']); $path = $_GET['q']; } else {