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

8.0.x
Alex Pott 2014-12-23 11:27:43 +01:00
parent 2e6efcbd03
commit aec0d2b0f0
12 changed files with 5 additions and 7 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 519 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 668 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 733 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 442 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 733 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1011 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 753 B

View File

@ -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.'));

View File

@ -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')) . ' ' : '');

View File

@ -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.');