mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
HTML encode url in ElidedLabel
* Fix #3905 - prevent double quotes and other invalid HTML characters from impeding on display of url in ElidedLabel
This commit is contained in:
parent
5c54dfe581
commit
ed60a3dcce
@ -105,8 +105,10 @@ void ElidedLabel::updateElidedText()
|
||||
const QFontMetrics metrix(font());
|
||||
displayText = metrix.elidedText(m_rawText, m_elideMode, width() - 2);
|
||||
}
|
||||
setText(m_url.isEmpty() ? displayText : htmlLinkTemplate.arg(m_url, displayText));
|
||||
setOpenExternalLinks(!m_url.isEmpty());
|
||||
|
||||
bool hasUrl = !m_url.isEmpty();
|
||||
setText(hasUrl ? htmlLinkTemplate.arg(m_url.toHtmlEscaped(), displayText) : displayText);
|
||||
setOpenExternalLinks(!hasUrl);
|
||||
}
|
||||
|
||||
void ElidedLabel::resizeEvent(QResizeEvent* event)
|
||||
|
Loading…
Reference in New Issue
Block a user