Allow HTML in all item content
RSS description may contain encoded entities
This commit is contained in:
@@ -35,8 +35,8 @@ page_head('Welcome'); ?>
|
||||
<article><?php
|
||||
if ($item) {
|
||||
while ($item) { ?>
|
||||
<p><a href=/item?id=<?=$item['id']?>><?=htmlentities($item['item_title'])?></a><br>
|
||||
<?=htmlentities($item['feed_title'])?><br><small><em><?=date_time($item['as_of'])?></em></small><?php
|
||||
<p><a href=/item?id=<?=$item['id']?>><?=$item['item_title']?></a><br>
|
||||
<?=$item['feed_title']?><br><small><em><?=date_time($item['as_of'])?></em></small><?php
|
||||
$item = $result->fetchArray(SQLITE3_ASSOC);
|
||||
}
|
||||
} else { ?>
|
||||
|
||||
@@ -51,7 +51,6 @@ if ($item) {
|
||||
|
||||
$published = date_time($item['published_on']);
|
||||
$updated = isset($item['updated_on']) ? date_time($item['updated_on']) : null;
|
||||
$isEncoded = (bool) $item['is_encoded'];
|
||||
|
||||
page_head(htmlentities("{$item['item_title']} | {$item['feed_title']}")); ?>
|
||||
<h1 class=item_heading>
|
||||
@@ -62,13 +61,7 @@ page_head(htmlentities("{$item['item_title']} | {$item['feed_title']}")); ?>
|
||||
Published <?=date_time($item['published_on'])?><?=$updated && $updated != $published ? " (Updated $updated)" : ''?>
|
||||
</div>
|
||||
<article>
|
||||
<div class=item_content><?php
|
||||
if ($isEncoded) {
|
||||
echo str_replace('<a ', '<a target=_blank rel=noopener ', $item['content']);
|
||||
} else {
|
||||
echo htmlentities($item['content']);
|
||||
} ?>
|
||||
</div>
|
||||
<div class=item_content><?=str_replace('<a ', '<a target=_blank rel=noopener ', $item['content'])?></div>
|
||||
<form class=action_buttons action=/item method=POST>
|
||||
<input type=hidden name=id value=<?=$_GET['id']?>>
|
||||
<a href="/">Done</a>
|
||||
|
||||
Reference in New Issue
Block a user