Skip to content
This repository has been archived by the owner on Aug 13, 2022. It is now read-only.

Commit

Permalink
sanitize entity title attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
Guite committed Sep 20, 2021
1 parent 648f314 commit 14ee49c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -78,7 +78,7 @@ protected function formatPage(PageEntity $entity): string
return $this->translator->trans(
'%title%',
[
'%title%' => $entity->getTitle(),
'%title%' => htmlspecialchars($entity->getTitle()),
],
'page'
);
Expand All @@ -92,7 +92,7 @@ protected function formatContentItem(ContentItemEntity $entity): string
return $this->translator->trans(
'%owningType%',
[
'%owningType%' => $entity->getOwningType(),
'%owningType%' => htmlspecialchars($entity->getOwningType()),
],
'contentItem'
);
Expand Down
2 changes: 1 addition & 1 deletion templates/bundles/ZikulaContentModule/Page/view.html.twig
Expand Up @@ -101,7 +101,7 @@
{{ page.workflowState|zikulacontentmodule_objectState }}
</td>
{% endif %}<td headers="hTitle" class="text-left">
<a href="{{ path('zikulacontentmodule_page_' ~ routeArea ~ 'display', {'slug': page.slug}) }}" title="{{ 'View detail page'|trans({}, 'messages')|e('html_attr') }}">{{ page.title|notifyFilters('zikulacontentmodule.filterhook.pages')|safeHtml }}</a>
<a href="{{ path('zikulacontentmodule_page_' ~ routeArea ~ 'display', {'slug': page.slug}) }}" title="{{ 'View detail page'|trans({}, 'messages')|e('html_attr') }}">{{ page.title|notifyFilters('zikulacontentmodule.filterhook.pages')|safeHtml|e }}</a>
</td>
{% if countPageViews %}
<td headers="hViews" class="text-right">
Expand Down

0 comments on commit 14ee49c

Please sign in to comment.