Parse Error from SVG

Wondering if any Tech gurus can assist! One of my clients has opened a second ‘operation’ and wants a second website very much based on their existing Rapidweaver site but with content modified to fit the new business.

So I duplicated the original site and started content modifications but all of a sudden I’m getting an error on one page:
Parse error: Syntax Error, unexpected ‘version’ (T-String)
(in Library/Containers/com.realmacsoftware.rapidweaver…)

After some digging I realised the ‘unexpected version’ is that listed in an SVG image I use in a few places. Remove the SVG and problem disappears.

However, the original site with the identical SVG shows no such errors.

Anyone explain what might be going on? The SVG rogue code appears to be at the beginning: <?xml version=“1.0”. If I remove the “?” all is fine.

Hey @manofdogz,

That’s odd.

An SVG is just an XML file, and that versioning info should be at the top. Here’s an example of a working SVG - does the rest of the line look similar to this one?

<?xml version="1.0" encoding="UTF-8"?>
<svg width="300" height="120" viewBox="0 0 300 120"
     xmlns="http://www.w3.org/2000/svg">
    <rect x="0" y="0" width="300" height="120" fill="#fafafa"/>
    <circle cx="60" cy="60" r="40" fill="#4caf50"/>
    <text x="130" y="70" font-size="24" fill="#333">
   manofdogz
  </text>
</svg>

Cheers,
Erwin

Yes - looks much the same. It is odd because the original project is fine. It is ONLY when I copy these sections to another project that the Syntax error occurs. When I remove the “?” or indeed the whole XML declaration, things appear to go back to normal. However, even when looking normal in preview, on publication I get a completely white screen and an error log in public_html showing the Parse error.