diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockTypeTest.php b/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockTypeTest.php index 8179e80..18e55df 100644 --- a/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockTypeTest.php +++ b/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockTypeTest.php @@ -171,7 +171,7 @@ public function testsCustomBlockAddTypes() { // The seven theme has markup inside the link, we cannot use clickLink(). if ($default_theme == 'seven') { $options = $theme != $default_theme ? array('query' => array('theme' => $theme)) : array(); - $this->assertLinkByHref(url('block/add/foo')); + $this->assertLinkByHref(url('block/add/foo', $options)); $this->drupalGet('block/add/foo', $options); } else { diff --git a/core/modules/system/templates/image.html.twig b/core/modules/system/templates/image.html.twig new file mode 100644 index 0000000..b6b238a --- /dev/null +++ b/core/modules/system/templates/image.html.twig @@ -0,0 +1,14 @@ +{# +/** + * @file + * Default theme implementation of an image. + * + * Available variables: + * - attributes: HTML attributes for the img tag. + * + * @see template_preprocess_image() + * + * @ingroup themeable + */ +#} + diff --git a/core/themes/seven/seven.theme b/core/themes/seven/seven.theme index bce8664..58abfc0 100644 --- a/core/themes/seven/seven.theme +++ b/core/themes/seven/seven.theme @@ -6,6 +6,8 @@ */ use Drupal\Core\Template\RenderWrapper; +use Drupal\Component\Utility\String; +use Drupal\Component\Utility\Xss; /** * Implements hook_library_info(). @@ -48,8 +50,8 @@ function seven_preprocess_page(&$variables) { function seven_preprocess_node_add_list(&$variables) { if (!empty($variables['content'])) { foreach ($variables['content'] as $type) { - $variables['types'][$type->type]['label'] = check_plain($type->name); - $variables['types'][$type->type]['description'] = filter_xss_admin($type->description); + $variables['types'][$type->type]['label'] = String::checkPlain($type->name); + $variables['types'][$type->type]['description'] = Xss::filterAdmin($type->description); $variables['types'][$type->type]['path'] = url('node/add/' . $type->type); } } @@ -67,9 +69,9 @@ function seven_preprocess_node_add_list(&$variables) { function seven_preprocess_custom_block_add_list(&$variables) { if (!empty($variables['content'])) { foreach ($variables['content'] as $id => $type) { - $variables['types'][$id]['label'] = check_plain($type->label()); - $variables['types'][$id]['description'] = filter_xss_admin($type->description); - $variables['types'][$id]['path'] = url('block/add/' . $type->id); + $variables['types'][$id]['label'] = String::checkPlain($type->label()); + $variables['types'][$id]['description'] = Xss::filterAdmin($type->description); + $variables['types'][$id]['path'] = \Drupal::l(String::checkPlain($type->name()), 'custom_block.add_form', array('custom_block_type' => $id), $options); } } } @@ -83,9 +85,9 @@ function seven_preprocess_admin_block_content(&$variables) { if (!empty($variables['content'])) { $variables['compact'] = system_admin_compact_mode() ? 'compact' : ''; foreach ($variables['content'] as $key => $item) { - $variables['content'][$key]['label'] = filter_xss_admin($item['title']); + $variables['content'][$key]['label'] = Xss::filterAdmin($item['title']); $variables['content'][$key]['path'] = url($item['href']); - $variables['content'][$key]['description'] = filter_xss_admin($item['description']); + $variables['content'][$key]['description'] = Xss::filterAdmin($item['description']); } } } diff --git a/core/themes/seven/templates/node-add-list.html.twig b/core/themes/seven/templates/node-add-list.html.twig index 9886e2f..dacbbd6 100644 --- a/core/themes/seven/templates/node-add-list.html.twig +++ b/core/themes/seven/templates/node-add-list.html.twig @@ -21,5 +21,7 @@ {% endfor %} {% else %} -

{{ 'You have not created any content types yet. Go to the content type creation page to add a new content type.'|t({'@create-content': url('admin/structure/types/add')}) }}

+ {% trans %} +

{{ 'You have not created any content types yet. Go to the content type creation page to add a new content type.'|t({'@create-content': url('admin/structure/types/add')}) }}

+ {% endtrans %} {% endif %}