1.7 version with bugfix of amperasand in stream names

This commit is contained in:
Alex Vanin 2018-12-09 11:25:34 +03:00
parent 9ea2236711
commit 6904b11f74
2 changed files with 6 additions and 8 deletions

View file

@ -1,29 +1,26 @@
# fleast # fleast
Least-favourite twitch streamers here Least-favourite twitch streamers here
## Change Log ## Change Log
### 1.7
- Fixed bug with displaying special symbols in stream name
### 1.6 ### 1.6
- Fixed bug, when IRL query could contain several copies of one stream - Fixed bug, when IRL query could contain several copies of one stream
### 1.5 ### 1.5
- IRL section is back with IRL query - IRL section is back with IRL query
- Fixed bug when games with `&` symbol could not found correctly. - Fixed bug when games with `&` symbol could not found correctly.
### 1.4 ### 1.4
- Polished internal code and now cherrypy server configuration - Polished internal code and now cherrypy server configuration
is independent from nginx reverse proxy is independent from nginx reverse proxy
### 1.3 ### 1.3
- Fixed bug when VOD-streams appear in list of live streams - Fixed bug when VOD-streams appear in list of live streams
### 1.2 ### 1.2
- Fixed some typos in text - Fixed some typos in text
- Fixed bug with chinese language streams - Fixed bug with chinese language streams
- Fixed bug when 0 streams are found if game name contains whitespaces in the end - 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 - Fixed bug with stream list if stream name contains '<' and '>' symbols
### 1.1 ### 1.1
- Form data now saved between querries - Form data now saved between querries
### 1.0 ### 1.0
- Initial release - Initial release

View file

@ -5,7 +5,7 @@ import cherrypy
from cherrypy.process.plugins import Daemonizer from cherrypy.process.plugins import Daemonizer
from twitch import TwitchClient from twitch import TwitchClient
ver = '1.6' ver = '1.7'
class FleastServer(object): class FleastServer(object):
@ -48,7 +48,8 @@ class FleastServer(object):
:param text: string with html source code :param text: string with html source code
:return: filtered string with html source code :return: filtered string with html source code
""" """
repl = {'"': '&quot;', '&': '&amp;', '<': '&lt;', '>': '&gt;'} repl = {'"': '&quot;', '<': '&lt;', '>': '&gt;'}
text.replace('&', '&amp;')
for i in repl: for i in repl:
text = text.replace(i, repl[i]) text = text.replace(i, repl[i])
return text return text