Hide message content in HTML when linking to an image

Closes #695
This commit is contained in:
Oleksii Holub
2022-06-29 21:43:43 +03:00
parent 356b1a6afd
commit edba9f36a7
13 changed files with 121 additions and 117 deletions

View File

@@ -39,11 +39,9 @@ public class SelfContainedSpecs : IClassFixture<TempOutputFixture>
ShouldDownloadMedia = true
}.ExecuteAsync(new FakeConsole());
var data = await File.ReadAllTextAsync(filePath);
var document = Html.Parse(data);
// Assert
document
Html
.Parse(await File.ReadAllTextAsync(filePath))
.QuerySelectorAll("body [src]")
.Select(e => e.GetAttribute("src")!)
.Select(f => Path.GetFullPath(f, dirPath))