Merge pull request #11232 from Chocobo1/escape

Revise HTML escaping in GUI
This commit is contained in:
Mike Tzou 2019-09-16 13:26:49 +08:00 committed by GitHub
commit bf64fe0d2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -4165,7 +4165,7 @@ void Session::handleUrlSeedAlert(const lt::url_seed_alert *p)
{ {
LogMsg(tr("URL seed lookup failed for URL: '%1', message: %2") LogMsg(tr("URL seed lookup failed for URL: '%1', message: %2")
.arg(QString::fromStdString(p->server_url()), QString::fromStdString(p->message())) .arg(QString::fromStdString(p->server_url()), QString::fromStdString(p->message()))
, Log::CRITICAL); , Log::WARNING);
} }
void Session::handleListenSucceededAlert(const lt::listen_succeeded_alert *p) void Session::handleListenSucceededAlert(const lt::listen_succeeded_alert *p)

View File

@ -602,7 +602,7 @@ void AddNewTorrentDialog::setupTreeview()
setWindowTitle(m_torrentInfo.name()); setWindowTitle(m_torrentInfo.name());
// Set torrent information // Set torrent information
m_ui->labelCommentData->setText(Utils::Misc::parseHtmlLinks(m_torrentInfo.comment())); m_ui->labelCommentData->setText(Utils::Misc::parseHtmlLinks(m_torrentInfo.comment().toHtmlEscaped()));
m_ui->labelDateData->setText(!m_torrentInfo.creationDate().isNull() ? m_torrentInfo.creationDate().toString(Qt::DefaultLocaleShortDate) : tr("Not available")); m_ui->labelDateData->setText(!m_torrentInfo.creationDate().isNull() ? m_torrentInfo.creationDate().toString(Qt::DefaultLocaleShortDate) : tr("Not available"));
// Prepare content tree // Prepare content tree

View File

@ -317,7 +317,7 @@ void PropertiesWidget::loadTorrentInfos(BitTorrent::TorrentHandle *const torrent
// URL seeds // URL seeds
loadUrlSeeds(); loadUrlSeeds();
m_ui->labelCreatedByVal->setText(m_torrent->creator().toHtmlEscaped()); m_ui->labelCreatedByVal->setText(m_torrent->creator());
// List files in torrent // List files in torrent
m_propListModel->model()->setupModelData(m_torrent->info()); m_propListModel->model()->setupModelData(m_torrent->info());