mirror of
https://github.com/e107inc/e107.git
synced 2025-08-05 22:27:34 +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.
|
$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.
|
if(strpos($url,"{e_") === 0) // Fix for broken links that use {e_MEDIA} etc.
|
||||||
{
|
{
|
||||||
//$url = $this->replaceConstants($url,'abs');
|
//$url = $this->replaceConstants($url,'abs');
|
||||||
@@ -2767,6 +2774,8 @@ class e_parse extends e_parser
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(strstr($url,e_MEDIA) || strstr($url,e_SYSTEM)) // prevent disclosure of 'hashed' path.
|
if(strstr($url,e_MEDIA) || strstr($url,e_SYSTEM)) // prevent disclosure of 'hashed' path.
|
||||||
{
|
{
|
||||||
$raw = true;
|
$raw = true;
|
||||||
@@ -4375,7 +4384,7 @@ class e_parser
|
|||||||
$path = null;
|
$path = null;
|
||||||
$file = trim($file);
|
$file = trim($file);
|
||||||
$ext = pathinfo($file, PATHINFO_EXTENSION);
|
$ext = pathinfo($file, PATHINFO_EXTENSION);
|
||||||
$accepted = array('jpg','gif','png','jpeg');
|
$accepted = array('jpg','gif','png','jpeg', 'svg');
|
||||||
|
|
||||||
|
|
||||||
if(!in_array($ext,$accepted))
|
if(!in_array($ext,$accepted))
|
||||||
|
Reference in New Issue
Block a user