suggest fix for #20
[rainbowstream.git] / rainbowstream / py3patch.py
index 604298411069fd7f6c0a678f09928c24c38ba004..83e5f0a1845bc4d781d2192a10f66ba71c77e208 100644 (file)
@@ -13,8 +13,11 @@ except:
 
 try:
     from HTMLParser import HTMLParser
+    def unescape(s):
+        p = HTMLParser()
+        return p.unescape(s)
 except:
-    from html.parser import HTMLParser
+    from html import unescape
 
 # raw_input and map functiion behaviour
 if sys.version[0] == "3":