From 834a10273b677aa343a9e5fc0cfb5650e631ced4 Mon Sep 17 00:00:00 2001 From: jangliss Date: Tue, 8 Feb 2005 16:22:24 +0000 Subject: [PATCH] This fixes empty src tags, and sets them to the blank image. IE causes a logout to occur when the img src tag is empty. Setting iframe, frame, or input image to the blank image shouldn't cause any issues. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@8826 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- ChangeLog | 2 ++ functions/mime.php | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/ChangeLog b/ChangeLog index 3059d5de..0718297e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -219,6 +219,8 @@ Version 1.5.1 -- CVS with Internet Explorer. - Replace links with clean images to stop issues with Internet Explorer not being able to track down the image. + - Empty src attribute on img tags causes logouts (IE only), replacing + string with blank.png. Version 1.5.0 diff --git a/functions/mime.php b/functions/mime.php index 6262a417..e4422622 100644 --- a/functions/mime.php +++ b/functions/mime.php @@ -1451,6 +1451,18 @@ function sq_fixatts($tagname, } } } + + + /** + * Replace empty src tags with the blank image. src is only used + * for frames, images, and image inputs. Doing a replace should + * not affect them working as should be, however it will stop + * IE from being kicked off when src for img tags are not set + */ + if (($attname == 'src') && ($attvalue = '""')) { + $attary{$attname} = '"' . SM_PATH . 'images/blank.png"'; + } + /** * Turn cid: urls into http-friendly ones. */ -- 2.25.1