Commit aec0d2b0 authored by alexpott's avatar alexpott

Issue #2358675 by LewisNyman, BarisW, mgifford, MarkoT91: Remove messages icons in misc

parent 2e6efcbd
...@@ -35,7 +35,7 @@ function hook_filter_info_alter(&$info) { ...@@ -35,7 +35,7 @@ function hook_filter_info_alter(&$info) {
*/ */
function hook_filter_secure_image_alter(&$image) { function hook_filter_secure_image_alter(&$image) {
// Turn an invalid image into an error indicator. // Turn an invalid image into an error indicator.
$image->setAttribute('src', base_path() . 'core/misc/message-16-error.png'); $image->setAttribute('src', base_path() . 'core/misc/icons/ea2800/error.svg');
$image->setAttribute('alt', t('Image removed.')); $image->setAttribute('alt', t('Image removed.'));
$image->setAttribute('title', t('This image has been removed. For security reasons, only images from the local domain are allowed.')); $image->setAttribute('title', t('This image has been removed. For security reasons, only images from the local domain are allowed.'));
......
...@@ -864,13 +864,11 @@ function _filter_html_image_secure_process($text) { ...@@ -864,13 +864,11 @@ function _filter_html_image_secure_process($text) {
*/ */
function filter_filter_secure_image_alter(&$image) { function filter_filter_secure_image_alter(&$image) {
// Turn an invalid image into an error indicator. // Turn an invalid image into an error indicator.
$image->setAttribute('src', base_path() . 'core/misc/message-16-error.png'); $image->setAttribute('src', base_path() . 'core/misc/icons/ea2800/error.svg');
$image->setAttribute('alt', t('Image removed.')); $image->setAttribute('alt', t('Image removed.'));
$image->setAttribute('title', t('This image has been removed. For security reasons, only images from the local domain are allowed.')); $image->setAttribute('title', t('This image has been removed. For security reasons, only images from the local domain are allowed.'));
$image_factory = \Drupal::service('image.factory'); $image->setAttribute('height', '16');
$error_image = $image_factory->get('core/misc/message-16-error.png'); $image->setAttribute('width', '16');
$image->setAttribute('height', $error_image->getHeight());
$image->setAttribute('width', $error_image->getWidth());
// Add a CSS class to aid in styling. // Add a CSS class to aid in styling.
$class = ($image->getAttribute('class') ? trim($image->getAttribute('class')) . ' ' : ''); $class = ($image->getAttribute('class') ? trim($image->getAttribute('class')) . ' ' : '');
......
...@@ -79,7 +79,7 @@ function testImageSource() { ...@@ -79,7 +79,7 @@ function testImageSource() {
$csrf_path = $public_files_path . '/' . implode('/', array_fill(0, substr_count($public_files_path, '/') + 1, '..')); $csrf_path = $public_files_path . '/' . implode('/', array_fill(0, substr_count($public_files_path, '/') + 1, '..'));
$druplicon = 'core/misc/druplicon.png'; $druplicon = 'core/misc/druplicon.png';
$red_x_image = base_path() . 'core/misc/message-16-error.png'; $red_x_image = base_path() . 'core/misc/icons/ea2800/error.svg';
$alt_text = t('Image removed.'); $alt_text = t('Image removed.');
$title_text = t('This image has been removed. For security reasons, only images from the local domain are allowed.'); $title_text = t('This image has been removed. For security reasons, only images from the local domain are allowed.');
......
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