src/eric7/Network/IRC/IrcUtilities.py

branch
eric7
changeset 10928
46651e194fbe
parent 10439
21c28b0f9e41
child 11090
f5f5f5803935
equal deleted inserted replaced
10927:ce599998be7d 10928:46651e194fbe
10 import re 10 import re
11 11
12 from PyQt6.QtCore import QCoreApplication, QTime 12 from PyQt6.QtCore import QCoreApplication, QTime
13 from PyQt6.QtWidgets import QApplication 13 from PyQt6.QtWidgets import QApplication
14 14
15 from eric7 import Preferences, Utilities 15 from eric7 import EricUtilities, Preferences
16 16
17 __UrlRe = re.compile( 17 __UrlRe = re.compile(
18 r"""((?:http|ftp|https):\/\/[\w\-_]+(?:\.[\w\-_]+)+""" 18 r"""((?:http|ftp|https):\/\/[\w\-_]+(?:\.[\w\-_]+)+"""
19 r"""(?:[\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?)""" 19 r"""(?:[\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?)"""
20 ) 20 )
58 @type str 58 @type str
59 @return processed message 59 @return processed message
60 @rtype str 60 @rtype str
61 """ 61 """
62 # step 1: cleanup message 62 # step 1: cleanup message
63 msg = Utilities.html_encode(msg) 63 msg = EricUtilities.html_encode(msg)
64 64
65 # step 2: replace IRC formatting characters 65 # step 2: replace IRC formatting characters
66 openTags = [] 66 openTags = []
67 parts = __ColorRe.split(msg) 67 parts = __ColorRe.split(msg)
68 msgParts = [] 68 msgParts = []

eric ide

mercurial