Projet

Général

Profil

Révision a2baadd1

Ajouté par Assos Assos il y a environ 10 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/print/print.pages.inc
193 193
  $print['favicon'] = theme_get_setting('toggle_favicon') ? "<link rel='shortcut icon' href='" . theme_get_setting('favicon') . "' type='image/x-icon' />\n" : '';
194 194

  
195 195
  if (!empty($print_css)) {
196
    drupal_add_css(strtr($print_css, array('%t' => path_to_theme())));
196
    drupal_add_css(strtr($print_css, array('%t' => drupal_get_path('theme', variable_get('theme_default')))));
197 197
  }
198 198
  else {
199 199
    drupal_add_css(drupal_get_path('module', 'print') . '/css/print.css');
......
254 254
      $footer = $print_footer_user;
255 255
      break;
256 256
  }
257
  // Delete the contextual links
258
  $footer = preg_replace('!\s*<div class="contextual-links-wrapper">.*?</div>!sim', '', $footer);
259

  
257 260
  $print['footer_message'] = filter_xss_admin($footer);
258 261

  
259 262
  $published_site = variable_get('site_name', 0);
......
387 390
          }
388 391
          // Because base href is the original page, change the link to
389 392
          // still be usable inside the print page
390
          $matches[1] = str_replace($url, base_path() . $_GET['q'] . $url, $matches[1]);
393
          $matches[1] = str_replace($url, check_plain(base_path() . $_GET['q'] . $url), $matches[1]);
391 394
        }
392 395
        else {
393 396
          // URL is relative, convert it into absolute URL
......
416 419
    }
417 420
  }
418 421

  
419
  return $ret;
422
  return filter_xss_admin($ret);
420 423
}
421 424

  
422 425
/**
......
671 674
  // Delete any links area
672 675
  $node->body = preg_replace('!\s*<div class="links">.*?</div>!sim', '', $node->body);
673 676

  
677
  // Delete the contextual links also
678
  $node->content = preg_replace('!\s*<div class="contextual-links-wrapper">.*?</div>!sim', '', $node->content);
679

  
674 680
  // Check URL list settings
675 681
  $_print_urls = _print_url_list_enabled($node, $format);
676 682

  

Formats disponibles : Unified diff