Fixed pages field escaping issues, needs admin update, too

This commit is contained in:
Matias Griese
2020-12-09 15:28:48 +02:00
parent 29bcbf042f
commit db24d3e53e
2 changed files with 9 additions and 3 deletions

View File

@@ -1,3 +1,9 @@
# v1.6.31
## mm/dd/2020
1. [](#bugfix)
* Fixed `pages` field escaping issues, needs admin update, too [admin#1990](https://github.com/getgrav/grav-plugin-admin/issues/1990)
# v1.6.30
## 12/03/2020

View File

@@ -688,7 +688,7 @@ class Pages
}
/**
* Get list of route/title of all pages.
* Get list of route/title of all pages. Title is in HTML.
*
* @param PageInterface $current
* @param int $level
@@ -721,10 +721,10 @@ class Pages
}
if ($showFullpath) {
$option = $current->route();
$option = htmlspecialchars($current->route());
} else {
$extra = $showSlug ? '(' . $current->slug() . ') ' : '';
$option = str_repeat('—-', $level). '▸ ' . $extra . $current->title();
$option = str_repeat('—-', $level). '▸ ' . $extra . htmlspecialchars($current->title());
}