Code

Updated regex
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 20 Jul 2006 05:36:16 +0000 (05:36 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 20 Jul 2006 05:36:16 +0000 (05:36 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4245 594d385d-05f5-0310-b6e9-bd551577e9d8

include/smarty/plugins/block.render.php

index dbbc4a9b69e60e8335e9a8cb7e4da5960e04d3f1..fd25db6c1976adc0b4c914a627e526e69209646a 100755 (executable)
@@ -33,7 +33,7 @@ function smarty_block_render($params, $text, &$smarty)
 
                /* Replace picture if object is disabled */
                if(isset($params['disable_picture'])){
-                       $syn = "/src=['\"][a-z0-9\/.]*['\"]/i";
+                       $syn = "/src=['\"][^\"']*['\"]/i";
                        $new = "src=\"".$params['disable_picture']."\"";
                        $text = preg_replace($syn,$new,$text);
                }
@@ -48,7 +48,7 @@ function smarty_block_render($params, $text, &$smarty)
        if(preg_match("/type['\"= ].*submit/",$text)){
                $text = preg_replace("/submit/","button",$text);
        }else{
-               $text = preg_replace("/value=['\" ].*['\" ]/","",$text);
+               $text = preg_replace("/value=['\"][^\"']*['\"]/","",$text);
        }
 
        /* Remove select options */