From 546baa3668406617f31b887d2eec131273f5c4de Mon Sep 17 00:00:00 2001 From: Elliott Pardee Date: Fri, 24 Aug 2018 05:37:47 -0400 Subject: [PATCH] Unescape HTML characters. --- .idea/workspace.xml | 116 ++++++++++++++++++--------------------- goarch_api/client.py | 2 +- goarch_api/lectionary.py | 3 +- setup.py | 2 +- 4 files changed, 58 insertions(+), 65 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 28d1c1f..c60cd8f 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,10 +2,8 @@ - - - + @@ -429,29 +424,6 @@ - - - - - - - - - - - - - - - - - - - - - - - @@ -464,6 +436,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -471,22 +480,5 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/goarch_api/client.py b/goarch_api/client.py index a0e5cc5..cf217ed 100644 --- a/goarch_api/client.py +++ b/goarch_api/client.py @@ -6,7 +6,7 @@ class HTTPClient: def __init__(self): self.session = requests.session() - user_agent = 'goarch_api (https://github.com/Oikonomia/goarch_api 1.0.5), Python/' + user_agent = 'goarch_api (https://github.com/Oikonomia/goarch_api 1.0.6), Python/' self.user_agent = f"{user_agent}{sys.version_info[0]}.{sys.version_info[1]}" def request(self, method, path): diff --git a/goarch_api/lectionary.py b/goarch_api/lectionary.py index e776940..8f4f3ae 100644 --- a/goarch_api/lectionary.py +++ b/goarch_api/lectionary.py @@ -1,4 +1,5 @@ import re +import html from lxml import etree @@ -8,7 +9,7 @@ from goarch_api.models import Translation, Icon def remove_html_tags(raw): regex = re.compile('<.*?>') - return re.sub(regex, " ", raw) + return html.unescape(re.sub(regex, " ", raw)) class Lectionary: diff --git a/setup.py b/setup.py index 4356f1c..b82272e 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup setup( name="goarch_api", - version="1.0.5", + version="1.0.6", author="Elliott Pardee", author_email="me@vypr.xyz", url="https://github.com/Oikonomia/goarch_api",