DeniedSanitizeSelectors not working
I have DeniedSanitizeSelectors set to RTE_DESANITIZE_TAGS.
public static readonly string[] RTE_DESANITIZE_TAGS = { "iframe[src]" };
When I call this code:
ExecuteCommandOption execCmdOption = new ExecuteCommandOption();
execCmdOption.Undo = true;
await _rteMessage.RestoreSelectionAsync();
await _rteMessage.ExecuteCommandAsync(CommandName.InsertHTML, value, execCmdOption);
And "value" is:
<div style="padding:56.25% 0 0 0;position:relative;">
<iframe width="560" height="315" src="https://player.vimeo.com/video/1139491180"
frameborder="0" allowfullscreen="" class="fr-draggable"></iframe>
</div>
The only HTML I see in the editor is the "div". The iframe is still removed.
The documentation says "Gets or sets the list of selectors to be removed from the default sanitization list, allowing them in the editor.", therefore, my constant value should be correct.
Is this a bug or am I missing something?
Hi Brian Pautsch,
We have considered the reported issue "DeniedSanitizeSelectors is not working properly in Blazor RichTextEditor" as a bug from our end, and the fix for the issue will be included in our upcoming weekly patch release scheduled on last week of December 2025.
Vinitha - Did this get deployed yet?
Hi Brian Pautsch,
- 3 Replies
- 2 Participants
-
BP Brian Pautsch
- Dec 18, 2025 10:12 PM UTC
- Jan 6, 2026 04:49 AM UTC