From 6904b11f74f67db66ac6f8c1b35b946c8bd8b09f Mon Sep 17 00:00:00 2001 From: alexvanin Date: Sun, 9 Dec 2018 11:25:34 +0300 Subject: [PATCH] 1.7 version with bugfix of amperasand in stream names --- README.md | 9 +++------ main.py | 5 +++-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 04d7205..97a2859 100644 --- a/README.md +++ b/README.md @@ -1,29 +1,26 @@ # fleast Least-favourite twitch streamers here + ## Change Log +### 1.7 +- Fixed bug with displaying special symbols in stream name ### 1.6 - Fixed bug, when IRL query could contain several copies of one stream - ### 1.5 - IRL section is back with IRL query - Fixed bug when games with `&` symbol could not found correctly. - ### 1.4 - Polished internal code and now cherrypy server configuration is independent from nginx reverse proxy - ### 1.3 - Fixed bug when VOD-streams appear in list of live streams - ### 1.2 - Fixed some typos in text - Fixed bug with chinese language streams - Fixed bug when 0 streams are found if game name contains whitespaces in the end - Fixed bug with stream list if stream name contains '<' and '>' symbols - ### 1.1 - Form data now saved between querries - ### 1.0 - Initial release diff --git a/main.py b/main.py index 84c3e83..f960ab7 100755 --- a/main.py +++ b/main.py @@ -5,7 +5,7 @@ import cherrypy from cherrypy.process.plugins import Daemonizer from twitch import TwitchClient -ver = '1.6' +ver = '1.7' class FleastServer(object): @@ -48,7 +48,8 @@ class FleastServer(object): :param text: string with html source code :return: filtered string with html source code """ - repl = {'"': '"', '&': '&', '<': '<', '>': '>'} + repl = {'"': '"', '<': '<', '>': '>'} + text.replace('&', '&') for i in repl: text = text.replace(i, repl[i]) return text