mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-06 08:05:18 -04:00
Remove nick from anchor names, causes problems
- Nicknames that contain " could break the formatting - Nicknames containing chars like < or > were converted to html entities by the QTextBrowser so the anchor was no longer identical with the anchor stored in the _listMsg list
This commit is contained in:
parent
de92c06f0b
commit
5f81d8efc8
2 changed files with 2 additions and 3 deletions
|
@ -902,7 +902,7 @@ void ChatWidget::addChatMsg(bool incoming, const QString &name, const QDateTime
|
|||
QString formatMsg = chatStyle.formatMessage(type, name, dtTimestamp, formattedMessage, formatFlag);
|
||||
QString timeStamp = dtTimestamp.toString(Qt::ISODate);
|
||||
|
||||
formatMsg.prepend(QString("<a name=\"%1_%2\"/>").arg(timeStamp).arg(name));
|
||||
formatMsg.prepend(QString("<a name=\"%1\"/>").arg(timeStamp));
|
||||
//To call this anchor do: ui->textBrowser->scrollToAnchor(QString("%1_%2").arg(timeStamp).arg(name));
|
||||
QTextCursor textCursor = QTextCursor(ui->textBrowser->textCursor());
|
||||
textCursor.movePosition(QTextCursor::End);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue