Commit d14441f7 authored by Nigel McNie's avatar Nigel McNie
Browse files

Use text_to_path instead of custom preg_replace hax.

parent e3298fc6
......@@ -53,8 +53,7 @@ class PluginExportHtml extends PluginExport {
public function __construct(User $user, $views, $artefacts) {
parent::__construct($user, $views, $artefacts);
// TODO move this normalisation into a method
$this->rootdir = 'portfolio-for-' . preg_replace('#[^a-zA-Z0-9_-]+#', '-', $user->get('username'));
$this->rootdir = 'portfolio-for-' . self::text_to_path($user->get('username'));
// Create basic required directories
foreach (array('files', 'views', 'static', 'static/smilies') as $directory) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment