mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 21:57:51 +02:00
Issue #1958 Improved SVG support.
This commit is contained in:
@@ -2745,6 +2745,13 @@ class e_parse extends e_parser
|
||||
{
|
||||
$this->staticCount++; // increment counter.
|
||||
|
||||
$ext = pathinfo($url, PATHINFO_EXTENSION);
|
||||
|
||||
if($ext === 'svg')
|
||||
{
|
||||
return $this->replaceConstants($url, 'abs');
|
||||
}
|
||||
|
||||
if(strpos($url,"{e_") === 0) // Fix for broken links that use {e_MEDIA} etc.
|
||||
{
|
||||
//$url = $this->replaceConstants($url,'abs');
|
||||
@@ -2766,6 +2773,8 @@ class e_parse extends e_parser
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if(strstr($url,e_MEDIA) || strstr($url,e_SYSTEM)) // prevent disclosure of 'hashed' path.
|
||||
{
|
||||
@@ -4375,7 +4384,7 @@ class e_parser
|
||||
$path = null;
|
||||
$file = trim($file);
|
||||
$ext = pathinfo($file, PATHINFO_EXTENSION);
|
||||
$accepted = array('jpg','gif','png','jpeg');
|
||||
$accepted = array('jpg','gif','png','jpeg', 'svg');
|
||||
|
||||
|
||||
if(!in_array($ext,$accepted))
|
||||
|
Reference in New Issue
Block a user