Revize 343aa66b
Přidáno uživatelem Vojtěch Bartička před téměř 3 roky(ů)
Backend/Core/Services/DocumentService/DocumentServiceEF.cs | ||
---|---|---|
176 | 176 |
{ |
177 | 177 |
var document = databaseContext.Documents.Include(d => d.Content).Single(d => d.Id == documentId); |
178 | 178 |
HtmlSanitizer sanitizer = new HtmlSanitizer(); |
179 |
sanitizer.AllowedAttributes.Clear(); |
|
180 |
if (sanitizer.AllowedTags.Contains("img")) |
|
181 |
{ |
|
182 |
sanitizer.AllowedTags.Remove("img"); |
|
183 |
} |
|
179 | 184 |
return new DocumentPreviewResponse() |
180 | 185 |
{ |
181 | 186 |
Content = sanitizer.Sanitize(document.Content.Content) |
Také k dispozici: Unified diff
Sanitize document preview