mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-12-23 01:55:01 +00:00
Improve makepathsafe()
This commit is contained in:
parent
409eabd13c
commit
2407d6e542
1 changed files with 4 additions and 1 deletions
5
core.php
5
core.php
|
@ -298,6 +298,8 @@ function makepathsafe($string)
|
|||
$string = preg_replace("/[?%*:|\"><()\\[\\]]/i", "", $string);
|
||||
// Collapse multiple dots into a single dot
|
||||
$string = preg_replace("/\.+/", ".", $string);
|
||||
// Don't allow slashes at the beginning
|
||||
$string = ltrim($string, "\\/");
|
||||
return $string;
|
||||
}
|
||||
|
||||
|
@ -924,7 +926,7 @@ class page_renderer
|
|||
<main>
|
||||
{content}
|
||||
</main>
|
||||
|
||||
{extra}
|
||||
<footer>
|
||||
<p>{footer-message}</p>
|
||||
<p>Powered by Pepperminty Wiki {version}, which was built by <a href='//starbeamrainbowlabs.com/'>Starbeamrainbowlabs</a>. Send bugs to 'bugs at starbeamrainbowlabs dot com' or <a href='//github.com/sbrl/Pepperminty-Wiki' title='Github Issue Tracker'>open an issue</a>.</p>
|
||||
|
@ -1015,6 +1017,7 @@ class page_renderer
|
|||
/// Secondary Parts ///
|
||||
|
||||
"{content}" => $content,
|
||||
"{extra}" => "",
|
||||
"{title}" => $title,
|
||||
];
|
||||
|
||||
|
|
Loading…
Reference in a new issue