Axivion: Fix html content with the issue info

Cut the unwanted content of the html received from the server.

Change-Id: If8d679282f4a4fafd3c2ab343c37e4774054f1b0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Jarek Kobus
2024-02-02 15:24:31 +01:00
parent f2f5c4346e
commit 6319cb64fe

View File

@@ -553,7 +553,11 @@ void AxivionPluginPrivate::fetchIssueInfo(const QString &id)
return;
const auto ruleHandler = [](const QByteArray &htmlText) {
dd->m_axivionOutputPane.updateAndShowRule(QString::fromUtf8(htmlText));
QByteArray fixedHtml = htmlText;
const int idx = htmlText.indexOf("<div class=\"ax-issuedetails-table-container\">");
if (idx >= 0)
fixedHtml = "<html><body>" + htmlText.mid(idx);
dd->m_axivionOutputPane.updateAndShowRule(QString::fromUtf8(fixedHtml));
};
m_issueInfoRunner.start(issueHtmlRecipe(QString("SV") + id, ruleHandler));