فهرست منبع

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.

jangliss 20 سال پیش
والد
کامیت
e3bd76503f
2فایلهای تغییر یافته به همراه14 افزوده شده و 0 حذف شده
  1. 2 0
      ChangeLog
  2. 12 0
      functions/mime.php

+ 2 - 0
ChangeLog

@@ -219,6 +219,8 @@ Version 1.5.1 -- CVS
 	with Internet Explorer.
   - Replace <img src="outbind://"> 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

+ 12 - 0
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.
         */