Commit aa655179 authored by jcnventura's avatar jcnventura

Issue #728176: convert URLs to absolute in the sent email.

parent 2e6ec181
......@@ -303,6 +303,14 @@ function print_mail_form_submit($form, &$form_state) {
$params['body'] = theme('print', array('node' => $node, 'format' => $link['format'], 'expand_css' => TRUE, 'message' => $sender_message));
// Img elements must be set to absolute
$pattern = '!<(img\s[^>]*?)>!is';
$params['body'] = preg_replace_callback($pattern, '_print_rewrite_urls', $params['body']);
// Convert the a href elements, to make sure no relative links remain
$pattern = '!<(a\s[^>]*?)>!is';
$params['body'] = preg_replace_callback($pattern, '_print_rewrite_urls', $params['body']);
$ok = FALSE;
$use_job_queue = variable_get('print_mail_job_queue', PRINT_MAIL_JOB_QUEUE_DEFAULT);
if ($use_job_queue) {
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment