Skip to content

Commit ce7ce10

Browse files
authored
Update RichTextPropertyEditor.cs (#19826)
Fix for #19824 issue
1 parent 965408d commit ce7ce10

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Umbraco.Infrastructure/PropertyEditors/RichTextPropertyEditor.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,6 @@ public override IEnumerable<ITag> GetTags(object? value, object? dataTypeConfigu
263263
richTextEditorValue?.EnsurePropertyTypePopulatedOnBlocks(_elementTypeCache);
264264
currentRichTextEditorValue?.EnsurePropertyTypePopulatedOnBlocks(_elementTypeCache);
265265

266-
RichTextEditorValue cleanedUpRichTextEditorValue = CleanAndMapBlocks(richTextEditorValue, blockValue => MapBlockValueFromEditor(blockValue, currentRichTextEditorValue?.Blocks, editorValue.ContentKey));
267-
268266
if (string.IsNullOrWhiteSpace(richTextEditorValue?.Markup))
269267
{
270268
return null;
@@ -284,6 +282,7 @@ public override IEnumerable<ITag> GetTags(object? value, object? dataTypeConfigu
284282
var sanitized = _htmlSanitizer.Sanitize(editorValueWithMediaUrlsRemoved);
285283

286284
richTextEditorValue.Markup = sanitized.NullOrWhiteSpaceAsNull() ?? string.Empty;
285+
RichTextEditorValue cleanedUpRichTextEditorValue = CleanAndMapBlocks(richTextEditorValue, blockValue => MapBlockValueFromEditor(blockValue, currentRichTextEditorValue?.Blocks, editorValue.ContentKey));
287286

288287
// return json
289288
return RichTextPropertyEditorHelper.SerializeRichTextEditorValue(cleanedUpRichTextEditorValue, _jsonSerializer);

0 commit comments

Comments
 (0)