1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-05 14:17:49 +02:00

Issue #1958 Improved SVG support.

This commit is contained in:
Cameron
2018-07-27 12:41:14 -07:00
parent 05be9ce8ba
commit a5187f8590

View File

@@ -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');
@@ -2767,6 +2774,8 @@ class e_parse extends e_parser
if(strstr($url,e_MEDIA) || strstr($url,e_SYSTEM)) // prevent disclosure of 'hashed' path.
{
$raw = true;
@@ -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))