Skip to content

Commit

Permalink
Fix error on opening chat with linefeeds in participant name (issue #103
Browse files Browse the repository at this point in the history
).
  • Loading branch information
suurjaak committed Oct 26, 2021
1 parent f82aafb commit a40f27e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ CHANGELOG
=========


4.8.2, 2021-10-26
---------------
- fixed error on opening chat with linefeeds in participant name (issue #103).


4.8.1, 2021-08-05
---------------
- fixed audio/video messages imported from live as simple file transfers (issue #102).
Expand Down
6 changes: 3 additions & 3 deletions skyperious/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
@author Erki Suurjaak
@created 26.11.2011
@modified 05.08.2021
@modified 26.10.2021
------------------------------------------------------------------------------
"""
from ConfigParser import RawConfigParser
Expand All @@ -24,8 +24,8 @@

"""Program title, version number and version date."""
Title = "Skyperious"
Version = "4.8.1.dev1"
VersionDate = "05.08.2021"
Version = "4.8.2.dev0"
VersionDate = "26.10.2021"

if getattr(sys, "frozen", False):
# Running as a pyinstaller executable
Expand Down
10 changes: 8 additions & 2 deletions skyperious/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
@author Erki Suurjaak
@created 26.11.2011
@modified 31.07.2021
@modified 26.10.2021
------------------------------------------------------------------------------
"""
import ast
Expand All @@ -24,6 +24,7 @@
import os
import re
import shutil
import string
import sys
import textwrap
import time
Expand Down Expand Up @@ -5490,7 +5491,12 @@ def load_chat(self, chat, center_message_id=None):
t = p["contact"]["name"]
if p["identity"] != p["contact"]["name"]:
t += " (%s)" % p["identity"]
plist.InsertImageStringItem(index, t, b, it_kind=1)
t = t.replace("\n", " ")
try: plist.InsertImageStringItem(index, t, b, it_kind=1)
except Exception:
t = re.sub(r"[^\w %s]" % re.escape(string.punctuation),
lambda m: "#%s" % ord(m.group(0)), t, re.U)
plist.InsertImageStringItem(index, t, b, it_kind=1)
plist.SetItemTextColour(index, plist.ForegroundColour)
plist.SetItemBackgroundColour(index, plist.BackgroundColour)
c = plist.GetItem(index)
Expand Down

0 comments on commit a40f27e

Please sign in to comment.