Browse Source

Merge pull request #11232 from Chocobo1/escape

Revise HTML escaping in GUI
adaptive-webui-19844
Mike Tzou 5 years ago committed by GitHub
parent
commit
bf64fe0d2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/base/bittorrent/session.cpp
  2. 2
      src/gui/addnewtorrentdialog.cpp
  3. 2
      src/gui/properties/propertieswidget.cpp

2
src/base/bittorrent/session.cpp

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

2
src/gui/addnewtorrentdialog.cpp

@ -602,7 +602,7 @@ void AddNewTorrentDialog::setupTreeview() @@ -602,7 +602,7 @@ void AddNewTorrentDialog::setupTreeview()
setWindowTitle(m_torrentInfo.name());
// 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"));
// Prepare content tree

2
src/gui/properties/propertieswidget.cpp

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

Loading…
Cancel
Save