Skip to content

Commit

Permalink
Documents: Fix folder creation, remove ending dots see BT#18698
Browse files Browse the repository at this point in the history
  • Loading branch information
jmontoyaa committed Apr 26, 2021
1 parent f7578c3 commit 728edde
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main/inc/lib/api.lib.php
Expand Up @@ -6670,6 +6670,10 @@ function api_replace_dangerous_char($filename, $treat_spaces_as_hyphens = true)
$treat_spaces_as_hyphens
);

// Replace multiple dots at the end.
$regex = "/\.+$/";
$url = preg_replace($regex, '', $url);

return $url;
}

Expand Down

0 comments on commit 728edde

Please sign in to comment.