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

Bugfix: escape short markdown embed code contents

This commit is contained in:
Starbeamrainbowlabs 2017-12-30 13:44:54 +00:00
parent 20261c835a
commit 02585fd960
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
3 changed files with 3 additions and 3 deletions

View file

@ -5359,7 +5359,7 @@ register_module([
break;
}
$fileInfo["Uploaded by"] = $pageindex->{$env->page}->lasteditor;
$fileInfo["Short markdown embed code"] = "<input type='text' class='short-embed-markdown-code' value='![{$fileInfo["Name"]}]($filepath | right | 350x350)' readonly /> <button class='short-embed-markdown-button'>Copy</button>";
$fileInfo["Short markdown embed code"] = "<input type='text' class='short-embed-markdown-code' value='![" . htmlentities($fileInfo["Name"]) . "](" . htmlentities($filepath) . " | right | 350x350)' readonly /> <button class='short-embed-markdown-button'>Copy</button>";
$preview_html .= "\t\t\t<h2>File Information</h2>
<table>";

View file

@ -122,7 +122,7 @@
"author": "Starbeamrainbowlabs",
"description": "Adds the ability to upload files to Pepperminty Wiki. Uploaded files act as pages and have the special 'File\/' prefix.",
"id": "feature-upload",
"lastupdate": 1513196201,
"lastupdate": 1514641395,
"optional": false
},
{

View file

@ -515,7 +515,7 @@ register_module([
break;
}
$fileInfo["Uploaded by"] = $pageindex->{$env->page}->lasteditor;
$fileInfo["Short markdown embed code"] = "<input type='text' class='short-embed-markdown-code' value='![{$fileInfo["Name"]}]($filepath | right | 350x350)' readonly /> <button class='short-embed-markdown-button'>Copy</button>";
$fileInfo["Short markdown embed code"] = "<input type='text' class='short-embed-markdown-code' value='![" . htmlentities($fileInfo["Name"]) . "](" . htmlentities($filepath) . " | right | 350x350)' readonly /> <button class='short-embed-markdown-button'>Copy</button>";
$preview_html .= "\t\t\t<h2>File Information</h2>
<table>";