1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-11-26 05:32:59 +00:00

Bugfix: Properly escape page names in the datalist

This commit is contained in:
Starbeamrainbowlabs 2016-09-27 20:08:16 +01:00
parent cbde150075
commit fe165bec3e
2 changed files with 4 additions and 2 deletions

View file

@ -1311,7 +1311,8 @@ class page_renderer
$result = "<datalist id='allpages'>\n"; $result = "<datalist id='allpages'>\n";
foreach($arrayPageIndex as $pagename => $pagedetails) foreach($arrayPageIndex as $pagename => $pagedetails)
{ {
$result .= "\t\t\t<option value='$pagename' />\n"; $escapedPageName = str_replace('"', '&quot;', $pagename);
$result .= "\t\t\t<option value=\"$escapedPageName\" />\n";
} }
$result .= "\t\t</datalist>"; $result .= "\t\t</datalist>";

View file

@ -1004,7 +1004,8 @@ class page_renderer
$result = "<datalist id='allpages'>\n"; $result = "<datalist id='allpages'>\n";
foreach($arrayPageIndex as $pagename => $pagedetails) foreach($arrayPageIndex as $pagename => $pagedetails)
{ {
$result .= "\t\t\t<option value='$pagename' />\n"; $escapedPageName = str_replace('"', '&quot;', $pagename);
$result .= "\t\t\t<option value=\"$escapedPageName\" />\n";
} }
$result .= "\t\t</datalist>"; $result .= "\t\t</datalist>";