Skip to content
Snippets Groups Projects
Commit aec0d2b0 authored by Alex Pott's avatar Alex Pott
Browse files

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

parent 2e6efcbd
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
core/misc/message-16-error.png

519 B

core/misc/message-16-help.png

668 B

core/misc/message-16-info.png

733 B

core/misc/message-16-warning.png

442 B

core/misc/message-24-error.png

733 B

core/misc/message-24-help.png

1.06 KiB

core/misc/message-24-info.png

1011 B

core/misc/message-24-ok.png

1.03 KiB

core/misc/message-24-warning.png

753 B

......@@ -35,7 +35,7 @@ function hook_filter_info_alter(&$info) {
*/
function hook_filter_secure_image_alter(&$image) {
// 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('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) {
*/
function filter_filter_secure_image_alter(&$image) {
// 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('title', t('This image has been removed. For security reasons, only images from the local domain are allowed.'));
$image_factory = \Drupal::service('image.factory');
$error_image = $image_factory->get('core/misc/message-16-error.png');
$image->setAttribute('height', $error_image->getHeight());
$image->setAttribute('width', $error_image->getWidth());
$image->setAttribute('height', '16');
$image->setAttribute('width', '16');
// Add a CSS class to aid in styling.
$class = ($image->getAttribute('class') ? trim($image->getAttribute('class')) . ' ' : '');
......
......@@ -79,7 +79,7 @@ function testImageSource() {
$csrf_path = $public_files_path . '/' . implode('/', array_fill(0, substr_count($public_files_path, '/') + 1, '..'));
$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.');
$title_text = t('This image has been removed. For security reasons, only images from the local domain are allowed.');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment