diff options
| author | 2013-11-12 22:37:25 +0100 | |
|---|---|---|
| committer | 2013-11-12 22:37:25 +0100 | |
| commit | 4c5e9d0dd828ec9da44b0f178edd73b7213d6d20 (patch) | |
| tree | a67d8c4ff620ae16ea874f8b4688643285d62ccd /app/views/helpers | |
| parent | fcc2e023ef2a783c48a02e359d4b3d8c0ff23734 (diff) | |
Cohérence htmlspecialchars
Le texte dans la base de données est en htmlspecialchars(UTF-8)
(c'est-à-dire avec `<>&'"` encodés) mais maintenant sans autre entité
HTML depuis
https://github.com/marienfressinaud/FreshRSS/commit/a4fc7becb8553198d132633d775989c89c8116cd
Ce patch supprime les htmlspecialchars qui faisaient du double-encodage,
et en modifie d'autres en entrée.
Diffstat (limited to 'app/views/helpers')
| -rw-r--r-- | app/views/helpers/view/global_view.phtml | 4 | ||||
| -rw-r--r-- | app/views/helpers/view/normal_view.phtml | 3 | ||||
| -rw-r--r-- | app/views/helpers/view/reader_view.phtml | 2 | ||||
| -rwxr-xr-x | app/views/helpers/view/rss_view.phtml | 2 |
4 files changed, 5 insertions, 6 deletions
diff --git a/app/views/helpers/view/global_view.phtml b/app/views/helpers/view/global_view.phtml index fc55ed8ba..0eb29b11a 100644 --- a/app/views/helpers/view/global_view.phtml +++ b/app/views/helpers/view/global_view.phtml @@ -10,7 +10,7 @@ <div class="category"> <div class="cat_header"> <a href="<?php echo _url ('index', 'index', 'get', 'c_' . $cat->id (), 'output', 'normal'); ?>"> - <?php echo htmlspecialchars($cat->name(), ENT_NOQUOTES, 'UTF-8'); ?><?php echo $catNotRead > 0 ? ' (' . $catNotRead . ')' : ''; ?> + <?php echo $cat->name(); ?><?php echo $catNotRead > 0 ? ' (' . $catNotRead . ')' : ''; ?> </a> </div> @@ -22,7 +22,7 @@ <a href="<?php echo _url ('index', 'index', 'get', 'f_' . $feed->id (), 'output', 'normal'); ?>"> <?php echo $not_read > 0 ? '<b>' : ''; ?> - <?php echo htmlspecialchars($feed->name(), ENT_NOQUOTES, 'UTF-8'); ?> + <?php echo $feed->name(); ?> <?php echo $not_read > 0 ? ' (' . $not_read . ')' : ''; ?> <?php echo $not_read > 0 ? '</b>' : ''; ?> </a> diff --git a/app/views/helpers/view/normal_view.phtml b/app/views/helpers/view/normal_view.phtml index 173fbad9a..faa52179a 100644 --- a/app/views/helpers/view/normal_view.phtml +++ b/app/views/helpers/view/normal_view.phtml @@ -46,7 +46,7 @@ if (isset ($this->entryPaginator) && !$this->entryPaginator->isEmpty ()) { $feed = HelperCategory::findFeed($this->cat_aside, $item->feed ()); //We most likely already have the feed object in cache if (empty($feed)) $feed = $item->feed (true); ?> - <li class="item website"><a href="<?php echo _url ('index', 'index', 'get', 'f_' . $feed->id ()); ?>"><img class="favicon" src="<?php echo $feed->favicon (); ?>" alt="✇" /> <span><?php echo htmlspecialchars($feed->name(), ENT_NOQUOTES, 'UTF-8'); ?></span></a></li> + <li class="item website"><a href="<?php echo _url ('index', 'index', 'get', 'f_' . $feed->id ()); ?>"><img class="favicon" src="<?php echo $feed->favicon (); ?>" alt="✇" /> <span><?php echo $feed->name(); ?></span></a></li> <li class="item title"><a target="_blank" href="<?php echo $item->link (); ?>"><?php echo $item->title (); ?></a></li> <?php if ($this->conf->toplineDate ()) { ?><li class="item date"><?php echo $item->date (); ?> </li><?php } ?> <?php if ($this->conf->toplineLink ()) { ?><li class="item link"><a target="_blank" href="<?php echo $item->link (); ?>"> </a></li><?php } ?> @@ -65,7 +65,6 @@ if (isset ($this->entryPaginator) && !$this->entryPaginator->isEmpty ()) { } ?> </div> - <ul class="horizontal-list bottom"> <?php if (!login_is_conf ($this->conf) || is_logged ()) { ?> <?php if ($this->conf->bottomlineRead ()) { ?><li class="item manage"><a class="read" href="<?php echo _url ('entry', 'read', 'id', $item->id (), 'is_read', $item->isRead () ? 0 : 1); ?>"> </a></li><?php } ?> diff --git a/app/views/helpers/view/reader_view.phtml b/app/views/helpers/view/reader_view.phtml index f808990f7..9b8ec6cde 100644 --- a/app/views/helpers/view/reader_view.phtml +++ b/app/views/helpers/view/reader_view.phtml @@ -16,7 +16,7 @@ if (isset ($this->entryPaginator) && !$this->entryPaginator->isEmpty ()) { if (empty($feed)) $feed = $item->feed (true); ?> <a href="<?php echo $item->link (); ?>"> - <img class="favicon" src="<?php echo $feed->favicon (); ?>" alt="✇" /> <span><?php echo htmlspecialchars($feed->name(), ENT_NOQUOTES, 'UTF-8'); ?></span> + <img class="favicon" src="<?php echo $feed->favicon (); ?>" alt="✇" /> <span><?php echo $feed->name(); ?></span> </a> <h1 class="title"><?php echo $item->title (); ?></h1> diff --git a/app/views/helpers/view/rss_view.phtml b/app/views/helpers/view/rss_view.phtml index 9358ef2a5..e34f3b8b5 100755 --- a/app/views/helpers/view/rss_view.phtml +++ b/app/views/helpers/view/rss_view.phtml @@ -12,7 +12,7 @@ $items = $this->entryPaginator->items (); foreach ($items as $item) { ?> <item> - <title><?php echo htmlspecialchars(html_entity_decode($item->title (), ENT_NOQUOTES, 'UTF-8'), ENT_NOQUOTES, 'UTF-8'); ?></title> + <title><?php echo $item->title (); ?></title> <link><?php echo $item->link (); ?></link> <?php $author = $item->author (); ?> <?php if ($author != '') { ?> |
