Fix : unquote url-like Fact value
authorBenoît Fontaine <benoitfontaine.ba@gmail.com>
Tue, 5 Nov 2019 20:58:09 +0000 (21:58 +0100)
committerBenoît Fontaine <benoitfontaine.ba@gmail.com>
Tue, 5 Nov 2019 20:58:09 +0000 (21:58 +0100)
getmyancestors.py

index ff9b5a33aece5402117264a0e1aea02537d94861..8bbc3cd29c95dedfa401440b4002e022594fa586 100755 (executable)
@@ -26,6 +26,7 @@ from __future__ import print_function
 import re
 import sys
 import time
+from urllib.parse import unquote
 import getpass
 import asyncio
 import argparse
@@ -369,7 +370,7 @@ class Fact:
                 if self.type in FACT_EVEN:
                     self.type = tree.fs._(FACT_EVEN[self.type])
                 elif self.type[:6] == "data:,":
-                    self.type = self.type[6:]
+                    self.type = unquote(self.type[6:])
                 elif self.type not in FACT_TAGS:
                     self.type = None
             if "date" in data: