aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-11-12 22:37:25 +0100
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-11-12 22:37:25 +0100
commit4c5e9d0dd828ec9da44b0f178edd73b7213d6d20 (patch)
treea67d8c4ff620ae16ea874f8b4688643285d62ccd /app
parentfcc2e023ef2a783c48a02e359d4b3d8c0ff23734 (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')
-rw-r--r--app/layout/aside_feed.phtml2
-rw-r--r--app/layout/aside_flux.phtml4
-rw-r--r--app/layout/layout.phtml2
-rwxr-xr-xapp/models/Entry.php2
-rw-r--r--app/views/helpers/view/global_view.phtml4
-rw-r--r--app/views/helpers/view/normal_view.phtml3
-rw-r--r--app/views/helpers/view/reader_view.phtml2
-rwxr-xr-xapp/views/helpers/view/rss_view.phtml2
8 files changed, 10 insertions, 11 deletions
diff --git a/app/layout/aside_feed.phtml b/app/layout/aside_feed.phtml
index 3cfce61c5..49767740b 100644
--- a/app/layout/aside_feed.phtml
+++ b/app/layout/aside_feed.phtml
@@ -54,7 +54,7 @@
<li class="item<?php echo ($this->flux && $this->flux->id () == $feed->id ()) ? ' active' : ''; ?><?php echo $feed->inError () ? ' error' : ''; ?><?php echo $nbEntries == 0 ? ' empty' : ''; ?>">
<a href="<?php echo _url ('configure', 'feed', 'id', $feed->id ()); ?>">
<img class="favicon" src="<?php echo $feed->favicon (); ?>" alt="✇" />
- <?php echo htmlspecialchars($feed->name (), ENT_NOQUOTES, 'UTF-8'); ?>
+ <?php echo $feed->name (); ?>
</a>
</li>
<?php } ?>
diff --git a/app/layout/aside_flux.phtml b/app/layout/aside_flux.phtml
index 87e2c000d..9471f1f7e 100644
--- a/app/layout/aside_flux.phtml
+++ b/app/layout/aside_flux.phtml
@@ -35,7 +35,7 @@
<li>
<?php $c_active = false; if ($this->get_c == $cat->id ()) { $c_active = true; } ?>
<div class="category stick<?php echo $c_active ? ' active' : ''; ?>">
- <a data-unread="<?php echo $cat->nbNotRead (); ?>" class="btn<?php echo $c_active ? ' active' : ''; ?>" href="<?php echo _url ('index', 'index', 'get', 'c_' . $cat->id ()); ?>"><?php echo htmlspecialchars($cat->name (), ENT_NOQUOTES, 'UTF-8'); ?></a>
+ <a data-unread="<?php echo $cat->nbNotRead (); ?>" class="btn<?php echo $c_active ? ' active' : ''; ?>" href="<?php echo _url ('index', 'index', 'get', 'c_' . $cat->id ()); ?>"><?php echo $cat->name (); ?></a>
<a class="btn dropdown-toggle" href="#"><i class="icon <?php echo $c_active ? 'i_up' : 'i_down'; ?>"></i></a>
</div>
@@ -51,7 +51,7 @@
<?php /* feed_config_template */ ?>
</div>
<img class="favicon" src="<?php echo $feed->favicon (); ?>" alt="✇" />
- <a class="feed" data-unread="<?php echo $feed->nbNotRead (); ?>" data-priority="<?php echo $feed->priority (); ?>" href="<?php echo _url ('index', 'index', 'get', 'f_' . $feed_id); ?>"><?php echo htmlspecialchars($feed->name(), ENT_NOQUOTES, 'UTF-8'); ?></a>
+ <a class="feed" data-unread="<?php echo $feed->nbNotRead (); ?>" data-priority="<?php echo $feed->priority (); ?>" href="<?php echo _url ('index', 'index', 'get', 'f_' . $feed_id); ?>"><?php echo $feed->name(); ?></a>
</li>
<?php } ?>
</ul>
diff --git a/app/layout/layout.phtml b/app/layout/layout.phtml
index 9d4147887..adcc74871 100644
--- a/app/layout/layout.phtml
+++ b/app/layout/layout.phtml
@@ -19,7 +19,7 @@
<?php } ?>
<link rel="icon" href="<?php echo Url::display ('/favicon.ico'); ?>" />
<?php if (isset ($this->rss_url)) { ?>
- <link rel="alternate" type="application/rss+xml" title="<?php echo htmlspecialchars($this->rss_title, ENT_COMPAT, 'UTF-8'); ?>" href="<?php echo Url::display ($this->rss_url); ?>" />
+ <link rel="alternate" type="application/rss+xml" title="<?php echo $this->rss_title; ?>" href="<?php echo Url::display ($this->rss_url); ?>" />
<?php } ?>
</head>
<body>
diff --git a/app/models/Entry.php b/app/models/Entry.php
index 5c6b379d8..e40cb5992 100755
--- a/app/models/Entry.php
+++ b/app/models/Entry.php
@@ -409,7 +409,7 @@ class EntryDAO extends Model_pdo {
}
$sql = 'SELECT e.* FROM ' . $this->prefix . 'entry e'
- . ' INNER JOIN ' . $this->prefix . 'feed f ON e.id_feed = f.id' . $where
+ . ' INNER JOIN ' . $this->prefix . 'feed f ON e.id_feed = f.id' . $where
. ' ORDER BY e.date' . $order . ', e.id' . $order;
if (empty($limitCount)) {
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 != '') { ?>