SVG parsing error for “lower” user roles
-
Hello,
I’m using successfully Kadence blocks with Admin and Editor users, but for Authors, there’s an issue that makes some blocks appear broken visually, but also in the editor.
When I try to repair the block in the editor, it works, but upon saving or updating, the block breaks again.
I noticed this issue happening on blocks using SVG icons like the Icon List that we use extensively, for exemple, here is the HTML code generated from an admin user editing an article :
<div style="display:inline-flex;justify-content:center;align-items:center" class="kt-svg-icon-list-single kt-svg-icon-list-single-fe_checkCircle"><svg style="display:inline-block;vertical-align:middle" viewbox="0 0 24 24" height="20" width="20" fill="none" stroke="currentColor" xmlns="https://www.w3.org/2000/svg" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path><polyline points="22 4 12 14.01 9 11.01"></polyline></svg></div><span class="kt-svg-icon-list-text">aaaa</span>
and the version after an author just check and update the same article :
<div class="kt-svg-icon-list-single kt-svg-icon-list-single-fe_checkCircle"></div><span class="kt-svg-icon-list-text">aaaa</span>
As you can notice the whole inline SVG has been stripped !
I tried to install Safe SVG and SVG support (forcing inline) plug-ins, but it still doesn’t solve the issue.
I have the possibility to promote my authors to editors, but the issue is also happening on our Multisite platform, when users are local Admin of their own sites, and only the Super Admin seems to be able to use Kadence Blocks without issue, and I can’t promote every local admin to super admin !
The difference between single site WordPress and WPMU is that the SVG code is less degraded in WPMU, the “path” tag is not stripped, but every other property (stroke, polyline ..) disappears.Exemple stripped HTML code rendered after a local admin use the icon list :
<svg viewbox="0 0 24 24" height="20" width="20" fill="none" xmlns="https://www.w3.org/2000/svg"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path></svg>
I’ve tried de-activating all plug-ins and using twenty nineteen theme, but the issue is still there.
I also tried on other users computer, different browsers, different internet access … yep, still there.
I had this issue with an other additional block plugin, but it was resolved by using Safe SVG (Ultimate blocks).
- The topic ‘SVG parsing error for “lower” user roles’ is closed to new replies.