From 25971816a0402fe1de81760dd1abf0447f04732b Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 2 May 2020 18:09:54 +0000 Subject: [PATCH] Unescape --- git.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git.py b/git.py index 80b91016a..f4542528b 100644 --- a/git.py +++ b/git.py @@ -7,7 +7,7 @@ __email__ = "bob@freedombone.net" __status__ = "Production" import os -import urllib.parse +import html def gitFormatContent(content: str) -> str: @@ -16,7 +16,7 @@ def gitFormatContent(content: str) -> str: """ contentStr = content.replace('
', '\n').replace('
', '\n') contentStr = contentStr.replace('

', '').replace('

', '\n') - contentStr = urllib.parse.unquote(contentStr) + contentStr = html.unescape(contentStr) if 'From ' in contentStr: contentStr = 'From ' + contentStr.split('From ', 1)[1] return contentStr