Skip to content

Commit 72ab91e

Browse files
committed
coding style
1 parent 0f24b53 commit 72ab91e

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

example-atom.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212

1313
?>
1414

15-
<h1><?php echo htmlSpecialChars($atom->title) ?></h1>
15+
<h1><?php echo htmlspecialchars($atom->title) ?></h1>
1616

1717
<?php foreach ($atom->entry as $entry): ?>
18-
<h2><a href="<?php echo htmlSpecialChars($entry->link['href']) ?>"><?php echo htmlSpecialChars($entry->title) ?></a>
19-
<small><?php echo date("j.n.Y H:i", (int) $entry->timestamp) ?></small></h2>
18+
<h2><a href="<?php echo htmlspecialchars($entry->link['href']) ?>"><?php echo htmlspecialchars($entry->title) ?></a>
19+
<small><?php echo date('j.n.Y H:i', (int) $entry->timestamp) ?></small></h2>
2020

2121
<?php if ($entry->content['type'] == 'html'): ?>
2222
<div><?php echo $entry->content ?></div>
2323
<?php else: ?>
24-
<p><?php echo htmlSpecialChars($entry->content) ?></p>
24+
<p><?php echo htmlspecialchars($entry->content) ?></p>
2525
<?php endif ?>
2626
<?php endforeach ?>

example-rss.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@
1111

1212
?>
1313

14-
<h1><?php echo htmlSpecialChars($rss->title) ?></h1>
14+
<h1><?php echo htmlspecialchars($rss->title) ?></h1>
1515

16-
<p><i><?php echo htmlSpecialChars($rss->description) ?></i></p>
16+
<p><i><?php echo htmlspecialchars($rss->description) ?></i></p>
1717

1818
<?php foreach ($rss->item as $item): ?>
19-
<h2><a href="<?php echo htmlSpecialChars($item->link) ?>"><?php echo htmlSpecialChars($item->title) ?></a>
20-
<small><?php echo date("j.n.Y H:i", (int) $item->timestamp) ?></small></h2>
19+
<h2><a href="<?php echo htmlspecialchars($item->link) ?>"><?php echo htmlspecialchars($item->title) ?></a>
20+
<small><?php echo date('j.n.Y H:i', (int) $item->timestamp) ?></small></h2>
2121

2222
<?php if (isset($item->{'content:encoded'})): ?>
2323
<div><?php echo $item->{'content:encoded'} ?></div>
2424
<?php else: ?>
25-
<p><?php echo htmlSpecialChars($item->description) ?></p>
25+
<p><?php echo htmlspecialchars($item->description) ?></p>
2626
<?php endif ?>
2727
<?php endforeach ?>

0 commit comments

Comments
 (0)