aboutsummaryrefslogtreecommitdiff
path: root/launcher
diff options
context:
space:
mode:
authorflow <flowlnlnln@gmail.com>2023-01-07 12:57:35 -0300
committerGitHub <noreply@github.com>2023-01-07 12:57:35 -0300
commit39becf607e4f4d8c206fd9cc4741fad80cb27856 (patch)
treef153dbf6f9ae2bd7f98ae91763f24ddd7d2a3754 /launcher
parent4b12c85d91be34504384117584fb4f25a754481e (diff)
parentf04703f09b35fa7449fe368b04565016e6482786 (diff)
downloadPrismLauncher-39becf607e4f4d8c206fd9cc4741fad80cb27856.tar.gz
PrismLauncher-39becf607e4f4d8c206fd9cc4741fad80cb27856.tar.bz2
PrismLauncher-39becf607e4f4d8c206fd9cc4741fad80cb27856.zip
Merge pull request #713 from redstrate/fix-html-rendering
Diffstat (limited to 'launcher')
-rw-r--r--launcher/ui/pages/modplatform/ModPage.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/launcher/ui/pages/modplatform/ModPage.cpp b/launcher/ui/pages/modplatform/ModPage.cpp
index 677bc4d6..75be25b2 100644
--- a/launcher/ui/pages/modplatform/ModPage.cpp
+++ b/launcher/ui/pages/modplatform/ModPage.cpp
@@ -428,6 +428,10 @@ void ModPage::updateUi()
text += "<hr>";
HoeDown h;
+
+ // hoedown bug: it doesn't handle markdown surrounded by block tags (like center, div) so strip them
+ current.extraData.body.remove(QRegularExpression("<[^>]*(?:center|div)\\W*>"));
+
ui->packDescription->setHtml(text + (current.extraData.body.isEmpty() ? current.description : h.process(current.extraData.body.toUtf8())));
ui->packDescription->flush();
}