فهرست منبع

Merge pull request #160 from Alkarex/patch-1

SimplePie : Corrige le cas des </body> et </html>
Marien Fressinaud 12 سال پیش
والد
کامیت
ca45605acf
1فایلهای تغییر یافته به همراه1 افزوده شده و 0 حذف شده
  1. 1 0
      lib/SimplePie/SimplePie/Sanitize.php

+ 1 - 0
lib/SimplePie/SimplePie/Sanitize.php

@@ -379,6 +379,7 @@ class SimplePie_Sanitize
 	protected function preprocess($html, $type)
 	protected function preprocess($html, $type)
 	{
 	{
 		$ret = '';
 		$ret = '';
+		$html = preg_replace('%</?(?:html|body)[^>]*?'.'>%is', '', $html);
 		if ($type & ~SIMPLEPIE_CONSTRUCT_XHTML)
 		if ($type & ~SIMPLEPIE_CONSTRUCT_XHTML)
 		{
 		{
 			// Atom XHTML constructs are wrapped with a div by default
 			// Atom XHTML constructs are wrapped with a div by default