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.

(cherry picked from commit 43dda13)
  • Loading branch information
zerocrates committed Aug 21, 2023
1 parent 9a1b8c6 commit 4482f4f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions application/view/omeka/site-admin/page/index.phtml
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 4482f4f

Please sign in to comment.