Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions src/Umbraco.Infrastructure/DeliveryApi/ApiRichTextMarkupParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,16 @@ private void ReplaceLocalLinks(HtmlDocument doc, IPublishedSnapshot publishedSna
link.SetAttributeValue("data-start-item-id", route.StartItem.Id.ToString("D"));
link.Attributes["type"]?.Remove();
},
url => link.SetAttributeValue("href", url),
() => link.Attributes.Remove("href"));
url =>
{
link.SetAttributeValue("href", url);
link.Attributes["type"]?.Remove();
},
() =>
{
link.Attributes.Remove("href");
link.Attributes["type"]?.Remove();
});
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public void Can_Parse_LocalLinks()
}

[Test]
public void Can_Parse_Legacy_LocalImages()
public void Can_Parse_Inline_LocalImages()
{
var key1 = Guid.Parse("395bdc0e8f4d4ad4af7f3a3f6265651e");
var data1 = new MockData()
Expand Down