1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-12-26 02:55:02 +00:00

Bugfix: Link pages with "'" in their names correctly in page lists

This commit is contained in:
Starbeamrainbowlabs 2017-03-09 15:53:29 +00:00
parent e0cedbf9b7
commit bdbb40070c
4 changed files with 4 additions and 3 deletions

View file

@ -41,6 +41,7 @@
- Fixed tag links at the bottom of pages for tags with a single quote (`'`) in them.
- Correct error message when attempting to move a page
- Improved security of PHP session cookie by setting HttpOnly flag.
- Linked pages with single quotes (`'`) in their names corectly in page lists.
## v0.12.1

View file

@ -5014,7 +5014,7 @@ function generate_page_list($pagelist)
!empty($pageindex->$pagename->redirect))
$pageDisplayName = "<em>$pageDisplayName</em>";
$result .= "<li><a href='index.php?page=$pagename'>$pageDisplayName</a>
$result .= "<li><a href='index.php?page=" . rawurlencode($pagename) . "'>$pageDisplayName</a>
<em class='size'>(" . human_filesize($pageindex->$pagename->size) . ")</em>
<span class='editor'><span class='texticon cursor-query' title='Last editor'>&#9998;</span> " . $pageindex->$pagename->lasteditor . "</span>
<time class='cursor-query' title='" . date("l jS \of F Y \a\\t h:ia T", $pageindex->$pagename->lastmodified) . "'>" . human_time_since($pageindex->$pagename->lastmodified) . "</time>

View file

@ -167,7 +167,7 @@
"author": "Starbeamrainbowlabs",
"description": "Adds a page that lists all the pages in the index along with their metadata.",
"id": "page-list",
"lastupdate": 1472230366,
"lastupdate": 1489074718,
"optional": false
},
{

View file

@ -133,7 +133,7 @@ function generate_page_list($pagelist)
!empty($pageindex->$pagename->redirect))
$pageDisplayName = "<em>$pageDisplayName</em>";
$result .= "<li><a href='index.php?page=$pagename'>$pageDisplayName</a>
$result .= "<li><a href='index.php?page=" . rawurlencode($pagename) . "'>$pageDisplayName</a>
<em class='size'>(" . human_filesize($pageindex->$pagename->size) . ")</em>
<span class='editor'><span class='texticon cursor-query' title='Last editor'>&#9998;</span> " . $pageindex->$pagename->lasteditor . "</span>
<time class='cursor-query' title='" . date("l jS \of F Y \a\\t h:ia T", $pageindex->$pagename->lastmodified) . "'>" . human_time_since($pageindex->$pagename->lastmodified) . "</time>