Browse Source

fix for new amazing bugs

Andrew Dolgov 11 months ago
parent
commit
73c432aba5
1 changed files with 5 additions and 3 deletions
  1. 5 3
      init.php

+ 5 - 3
init.php

@@ -28,11 +28,13 @@ class Af_GoodShowSir extends Plugin {
 			foreach ($images as $img) {
 				$src = $img->getAttribute("src");
 
-				if (strpos($src, " ") !== FALSE) {
-					$img->setAttribute("src", trim($src));
+				$tmp = trim($src);
+				$tmp = str_replace("%20", "", $tmp);
 
-					$found = true;
+				if ($tmp != $src) {
+					$img->setAttribute("src", $tmp);
 
+					$found = true;
 				}
 			}
 		}