diff --git a/bl-kernel/admin/themes/default/init.php b/bl-kernel/admin/themes/default/init.php index bc67c0d9..75b46d9c 100644 --- a/bl-kernel/admin/themes/default/init.php +++ b/bl-kernel/admin/themes/default/init.php @@ -356,7 +356,7 @@ $(document).ready(function() { { type: "json", action: HTML_PATH_ADMIN_ROOT+"ajax/uploader", - allow : "*.(jpg|jpeg|gif|png)", + allow : "*.(jpg|jpeg|gif|png|svg)", params: {"type":"profilePicture", "username":"'.$username.'"}, loadstart: function() { @@ -391,4 +391,4 @@ $(document).ready(function() { echo $html.$script; } -} \ No newline at end of file +} diff --git a/bl-kernel/ajax/uploader.php b/bl-kernel/ajax/uploader.php index 74206383..281dddaf 100644 --- a/bl-kernel/ajax/uploader.php +++ b/bl-kernel/ajax/uploader.php @@ -47,11 +47,20 @@ if($type=='profilePicture') else { // Generate the thumbnail $Image = new Image(); - $Image->setImage(PATH_TMP.'original'.'.'.$fileExtension, THUMBNAILS_WIDTH, THUMBNAILS_HEIGHT, 'crop'); - $Image->saveImage(PATH_UPLOADS_THUMBNAILS.$tmpName, THUMBNAILS_QUALITY, true); + + //Handling all other formats than svg + if (strcasecmp($fileExtension, 'svg') != 0) { + $Image->setImage(PATH_TMP.'original'.'.'.$fileExtension, THUMBNAILS_WIDTH, THUMBNAILS_HEIGHT, 'crop'); + $Image->saveImage(PATH_UPLOADS_THUMBNAILS.$tmpName, THUMBNAILS_QUALITY, true); + } // Move the original to the upload folder. rename(PATH_TMP.'original'.'.'.$fileExtension, PATH_UPLOADS.$tmpName); + + //If it is a svg file, just save a copy in thumbnail-folder + if (strcasecmp($fileExtension, 'svg') == 0) { + symlink(PATH_UPLOADS.$tmpName, PATH_UPLOADS_THUMBNAILS.$tmpName); + } } // Remove the Bludit temporary file. diff --git a/bl-plugins/about/plugin.php b/bl-plugins/about/plugin.php index 7a1e5579..bb3eccb1 100644 --- a/bl-plugins/about/plugin.php +++ b/bl-plugins/about/plugin.php @@ -18,7 +18,6 @@ class pluginAbout extends Plugin { $html .= ''; $html .= ''; $html .= ''; - $html .= '
'; $html .= ''; $html .= ''; @@ -32,10 +31,10 @@ class pluginAbout extends Plugin { $html = '
'; $html .= '

'.$this->getDbField('label').'

'; $html .= '
'; - $html .= nl2br($this->getDbField('text')); + $html .= html_entity_decode(nl2br($this->getDbField('text'))); $html .= '
'; $html .= '
'; return $html; } -} \ No newline at end of file +}