diff options
author | Trial97 <alexandru.tripon97@gmail.com> | 2023-07-04 17:48:20 +0300 |
---|---|---|
committer | Trial97 <alexandru.tripon97@gmail.com> | 2023-07-14 23:35:18 +0300 |
commit | 9b02c31f8dab0f36f3d0c30115ab323dabe21541 (patch) | |
tree | 439065fd04f1e505194e793868a7240d65d0f631 /launcher/modplatform | |
parent | 50dae9d4f38d84f168922552e9f87bf2d1130d98 (diff) | |
download | PrismLauncher-9b02c31f8dab0f36f3d0c30115ab323dabe21541.tar.gz PrismLauncher-9b02c31f8dab0f36f3d0c30115ab323dabe21541.tar.bz2 PrismLauncher-9b02c31f8dab0f36f3d0c30115ab323dabe21541.zip |
escaped text for html export
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
Diffstat (limited to 'launcher/modplatform')
-rw-r--r-- | launcher/modplatform/helpers/ExportToModList.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/launcher/modplatform/helpers/ExportToModList.cpp b/launcher/modplatform/helpers/ExportToModList.cpp index a8a015e3..e7bafac4 100644 --- a/launcher/modplatform/helpers/ExportToModList.cpp +++ b/launcher/modplatform/helpers/ExportToModList.cpp @@ -26,9 +26,9 @@ QString toHTML(QList<Mod*> mods, OptionalData extraData) QStringList lines; for (auto mod : mods) { auto meta = mod->metadata(); - auto modName = mod->name(); + auto modName = mod->name().toHtmlEscaped(); if (extraData & Url) { - auto url = mod->metaurl(); + auto url = mod->metaurl().toHtmlEscaped(); if (!url.isEmpty()) modName = QString("<a href=\"%1\">%2</a>").arg(url, modName); } @@ -38,10 +38,10 @@ QString toHTML(QList<Mod*> mods, OptionalData extraData) if (ver.isEmpty() && meta != nullptr) ver = meta->version().toString(); if (!ver.isEmpty()) - line += QString(" [%1]").arg(ver); + line += QString(" [%1]").arg(ver.toHtmlEscaped()); } if (extraData & Authors && !mod->authors().isEmpty()) - line += " by " + mod->authors().join(", "); + line += " by " + mod->authors().join(", ").toHtmlEscaped(); lines.append(QString("<li>%1</li>").arg(line)); } return QString("<html><body><ul>\n\t%1\n</ul></body></html>").arg(lines.join("\n\t")); |