Skip to content

Commit

Permalink
Escape page title for users who can't edit
Browse files Browse the repository at this point in the history
They have a separate unlinked display of the page titles that wasn't
being escaped.

Escape the slugs at the same time, even though they should already be
guaranteed to never contain "interesting" characters.
  • Loading branch information
zerocrates committed Aug 14, 2023
1 parent 48c2bd4 commit 43dda13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions application/view/omeka/site-admin/page/index.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ $this->htmlElement('body')->appendAttribute('class', 'sites pages browse');
<?php if ($page->userIsAllowed('update')): ?>
<?php echo $page->link($page->title(), 'edit'); ?>
<?php else: ?>
<?php echo $page->title(); ?>
<?php echo $escape($page->title()); ?>
<?php endif; ?>
<?php if (!$page->isPublic()): ?>
<span class="o-icon-private" aria-label="<?php echo $translate('Private'); ?>"></span>
Expand Down Expand Up @@ -65,7 +65,7 @@ $this->htmlElement('body')->appendAttribute('class', 'sites pages browse');
<?php endif; ?>
</ul>
</td>
<td><?php echo $page->slug(); ?></td>
<td><?php echo $escape($page->slug()); ?></td>
<td><?php echo $escape($i18n->dateFormat($sortBy === 'created' ? $page->created() : $page->modified())); ?></td>
</tr>
<?php endforeach; ?>
Expand Down

0 comments on commit 43dda13

Please sign in to comment.