소스 검색

Also escaping the alt attribute now.

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@20658 44c647ce-9c0f-0410-b52a-842ac1e357ba
kokx 16 년 전
부모
커밋
3a46faf2c5
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      library/Zend/Markup/Renderer/Html/Img.php

+ 3 - 1
library/Zend/Markup/Renderer/Html/Img.php

@@ -73,8 +73,10 @@ class Zend_Markup_Renderer_Html_Img extends Zend_Markup_Renderer_Html_HtmlAbstra
             }
             }
         }
         }
 
 
-        // run the URI through htmlentities
+        // run the URI and alt through htmlentities
         $uri = htmlentities($uri, ENT_QUOTES, 'UTF-8');
         $uri = htmlentities($uri, ENT_QUOTES, 'UTF-8');
+        $alt = htmlentities($alt, ENT_QUOTES, 'UTF-8');
+
 
 
         return "<img src=\"{$uri}\" alt=\"{$alt}\"" . Zend_Markup_Renderer_Html::renderAttributes($token) . " />";
         return "<img src=\"{$uri}\" alt=\"{$alt}\"" . Zend_Markup_Renderer_Html::renderAttributes($token) . " />";
     }
     }