mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-22 04:23:01 +00:00
Bugfix: correctly escape ampersands with htmlentities in URLs
This commit is contained in:
parent
42971f573d
commit
23998f60bf
1 changed files with 6 additions and 2 deletions
|
@ -174,7 +174,7 @@ class page_renderer
|
||||||
|
|
||||||
// Push the logo via HTTP/2.0 if possible
|
// Push the logo via HTTP/2.0 if possible
|
||||||
if($settings->favicon[0] === "/") self::$http2_push_items[] = ["image", $settings->favicon];
|
if($settings->favicon[0] === "/") self::$http2_push_items[] = ["image", $settings->favicon];
|
||||||
|
|
||||||
$parts = [
|
$parts = [
|
||||||
"{body}" => $body_template,
|
"{body}" => $body_template,
|
||||||
|
|
||||||
|
@ -439,7 +439,11 @@ class page_renderer
|
||||||
foreach($nav_links as $item) {
|
foreach($nav_links as $item) {
|
||||||
if(!is_string($item)) {
|
if(!is_string($item)) {
|
||||||
// Output the item as a link to a url
|
// Output the item as a link to a url
|
||||||
$result .= "<span><a href='" . str_replace("{page}", rawurlencode($env->page), $item[1]) . "'>$item[0]</a></span>";
|
$result .= "<span><a href='" . str_replace(
|
||||||
|
[ "{page}", "&" ],
|
||||||
|
[ rawurlencode($env->page), "&" ],
|
||||||
|
$item[1]
|
||||||
|
) . "'>$item[0]</a></span>";
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue