Syntax checker for Inline SVG's

Would it be possible to add a little syntax checker for the SVG Block’s inline input field?
The icon gets still displayed correctly in many scenarios when there’s no correct syntax.

For example, both (#1 incorrect, #2 correct) work in the back-end:

<svg xmlns="..." viewBox="..."> <path "..."></pa
<svg xmlns="..." viewBox="..."> <path "..."></path></svg>

This implies to the user that everything works as expected.
Now, when trying to save the page, I’m getting the “Updating failed” banner.

It also crashes the entire site:


This can be problematic when I don’t know the source of error, especially when not saving (or in this case, trying to save) directly after I inserted the SVG code.
Worst case, I lose all my work because I’m unable to save the page and can’t figure out what’s wrong.
A simple user error when copying the SVG, missing the closing bracket is quite common.

1 Like

Hello @Marius,

Thanks for bringing this up.
Definitely something we should add to prevent this happening.
We’ll be addressing it in the coming updates.


Hi @Marius,

Thank you for bringing this to our attention!

This should now be fixed with, with the addition of a notice:

Kindly let me know if this is the case on your end.

Thank you in advance.