Skip to content

Commit

Permalink
πŸ“„ Add support for Text Documents on the Playground
Browse files Browse the repository at this point in the history
  • Loading branch information
ConradSollitt committed Dec 3, 2024
1 parent 2ce4f8e commit 81864f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ function getSite($path) {
// [index.php] is not allowed because users are not allowed to modify it,
// and [index.htm] because it could override the default page.
function fileNameIsValid($name) {
$pattern = '/^[a-zA-Z0-9_\-]{1,}.(php|htm|js|css|svg)$/';
$pattern = '/^[a-zA-Z0-9_\-]{1,}.(php|htm|js|css|svg|txt)$/';
if (!preg_match($pattern, $name)) {
return false;
}
Expand Down

0 comments on commit 81864f4

Please sign in to comment.