mirror of
https://github.com/evennia/evennia.git
synced 2026-03-22 15:56:30 +01:00
Fixed an issue with a too-inclusive regex for URLs in the webclient. Resolves Issue 322.
This commit is contained in:
parent
80a6745a1e
commit
27668a565d
1 changed files with 1 additions and 1 deletions
|
|
@ -113,7 +113,7 @@ class TextToHTMLparser(object):
|
|||
|
||||
def convert_urls(self, text):
|
||||
"Replace urls (http://...) by valid HTML"
|
||||
regexp = r"((ftp|www|http)(\W+\S+[^).,:;?\]\}(\<span\>) \r\n$]+))"
|
||||
regexp = r"((ftp|www|http)(\W+\S+[^).,:;?\]\}(\<span\>) \r\n$\"\']+))"
|
||||
# -> added target to output prevent the web browser from attempting to
|
||||
# change pages (and losing our webclient session).
|
||||
return re.sub(regexp, r'<a href="\1" target="_blank">\1</a>', text)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue