Issue #2358675 by LewisNyman, BarisW, mgifford, MarkoT91: Remove messages icons in misc
Before Width: | Height: | Size: 519 B |
Before Width: | Height: | Size: 668 B |
Before Width: | Height: | Size: 733 B |
Before Width: | Height: | Size: 442 B |
Before Width: | Height: | Size: 733 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1011 B |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 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 @@ class FilterHtmlImageSecureTest extends WebTestBase {
|
|||
$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.');
|
||||
|
||||
|
|