Add doctype header to forum threads

This should fix mimetype detection on most systems and is more relevant
now that the report is clickable
This commit is contained in:
I-Al-Istannen
2024-11-05 18:36:21 +01:00
parent 596b6a7688
commit 6dda4c55a8
2 changed files with 3 additions and 1 deletions

View File

@ -38,6 +38,7 @@ ambiguous situations.
- Crawling of nested courses - Crawling of nested courses
- Downloading of links with no target URL - Downloading of links with no target URL
- Handle row flex on description pages - Handle row flex on description pages
- Add `<!DOCTYPE html>` heading to forum threads to fix mime type detection
## 3.6.0 - 2024-10-23 ## 3.6.0 - 2024-10-23

View File

@ -750,7 +750,8 @@ instance's greatest bottleneck.
return return
async with maybe_dl as (bar, sink): async with maybe_dl as (bar, sink):
content = element.title_tag.prettify() content = "<!DOCTYPE html>\n"
content += element.title_tag.prettify()
content += element.content_tag.prettify() content += element.content_tag.prettify()
sink.file.write(content.encode("utf-8")) sink.file.write(content.encode("utf-8"))
sink.done() sink.done()