Просмотр исходного кода

Do not perform double HTML-encoding

The content seem to be already HTML safe, e.g. for some feeds in UTF-8
with HTML special characters encoded, for some other feeds with all
eligible characters HTML-encoded
Alexandre Alapetite 12 лет назад
Родитель
Сommit
742854ffb4
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      app/models/Feed.php

+ 1 - 1
app/models/Feed.php

@@ -216,7 +216,7 @@ class Feed extends Model {
 		foreach ($feed->get_items () as $item) {
 			$title = $item->get_title ();
 			$title = preg_replace('#<a(.+)>(.+)</a>#', '\\2', $title);
-			$title = htmlentities($title);
+			//$title = htmlentities($title, ENT_NOQUOTES, 'UTF-8');  //Do not do double html-encoding (debug needed)
 			$author = $item->get_author ();
 			$link = $item->get_permalink ();
 			$date = strtotime ($item->get_date ());