• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved The SVG file … cannot be uploaded: Suspicious node 'svg' (Line: -1)

PierreLannoy

New Pleskian
Server operating system version
Cloudlinux 8.7
Plesk version and microupdate number
18.0.51 Update #1
Hello all!
When I create a new server (I do it via scripts), I'm setting branding options too. From some times now, my script triggers an error on the following command: plesk bin branding --custom-logo -file /tmp/header.svg
After investigation, I found the sanitization that is made by Plesk in such a case doesn't allow svg tags. The error message is The SVG file /tmp/header.svg cannot be uploaded: Suspicious node 'svg' (Line: -1)about… (too bad, svg tag is not allowed in svg files ;) )

Has anyone encountered this and if so how did you solve the problem?

Thanks in advance
 
We know of similar product issue for SVG files documented in Input - Standard .svg file not accepted as favicon file, workaround: place it into directory directly and Input - Standard .svg file not accepted as favicon file, workaround: place it into directory directly

Could you please try to run your file through Optimize SVG Images Online and try again with their output?

If it does not work afterwards, could you please provide your file here publicly or in a private message so that I can forward it to developers?
 
Hello Peter!
Thanks to you (and your remark), I decided to "dive in" a bit to understand why a standard compliant svg file was not correctly used by Plesk in this case.
What I understood after several trials/errors is that the Plesk sanitizer does not allow all options and flags for ?xml and !DOCTYPE tags and, therefore, doesn't fully supports svg dom subtrees.
If you want to understand, just try the following legit two lines:
Code:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
I got it, from now on I will systematically delete these 2 lines (so as not to waste time understanding which tags and attributes trigger the sanitizer error). But I still say that the sanitizer should accept files that strictly conform to the svg format…

Thanks for the help.
 
Back
Top