Procházet zdrojové kódy

SimplePie : Corrige le cas des </body> et </html>

Corrige https://github.com/marienfressinaud/FreshRSS/issues/159
Les balises fermantes /body et /html n'étaient pas nettoyées par SimplePie.
À tester un moment puis proposer en amont à SimplePie.
Alexandre Alapetite před 12 roky
rodič
revize
5923e1a640
1 změnil soubory, kde provedl 1 přidání a 0 odebrání
  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)
 	{
 		$ret = '';
+		$html = preg_replace('%</?(?:html|body)[^>]*?'.'>%is', '', $html);
 		if ($type & ~SIMPLEPIE_CONSTRUCT_XHTML)
 		{
 			// Atom XHTML constructs are wrapped with a div by default