diff options
| author | OmniTroid <davidskoland@gmail.com> | 2017-03-14 15:29:11 +0100 |
|---|---|---|
| committer | OmniTroid <davidskoland@gmail.com> | 2017-03-14 15:29:11 +0100 |
| commit | 38c01f2cca55222f7d40b03367aea1f5b2f9c463 (patch) | |
| tree | db6dbb809d666f2c774de811b7762de669c297f2 /courtroom.cpp | |
| parent | 47baf6ef1c88795583b3d20de9086026d7556bfc (diff) | |
fixed a hyperlink bug
Diffstat (limited to 'courtroom.cpp')
| -rw-r--r-- | courtroom.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/courtroom.cpp b/courtroom.cpp index 86dca5c1..868ed9f6 100644 --- a/courtroom.cpp +++ b/courtroom.cpp @@ -858,7 +858,10 @@ void Courtroom::append_ms_chatmessage(QString f_message) for (QString i_word : word_list) { if (i_word.startsWith("http")) + { + i_word.replace("\n", "").replace("\r", ""); ui_ms_chatlog->insertHtml("<a href=\"" + i_word + "\">" + i_word + "</a> "); + } else ui_ms_chatlog->insertPlainText(i_word + " "); } @@ -895,7 +898,10 @@ void Courtroom::append_server_chatmessage(QString f_name, QString f_message) for (QString i_word : word_list) { if (i_word.startsWith("http")) + { + i_word.replace("\n", "").replace("\r", ""); ui_server_chatlog->insertHtml("<a href=\"" + i_word + "\">" + i_word + "</a> "); + } else ui_server_chatlog->insertPlainText(i_word + " "); } |
