diff --git a/content/models.py b/content/models.py index ef1d5ab..0f684ef 100644 --- a/content/models.py +++ b/content/models.py @@ -285,7 +285,7 @@ def toHTML(self, external_links=False): markup = NOAT(self.content) for anno in self.annotations: a = copy.deepcopy(anno) - if 'url' in a: + if 'url' in a and a['url'] is not None: a['href'] = a.pop('url').replace('"','"').replace('\n',' ') if len(a['href'].split('://')) > 1 and external_links: a['target'] = '_blank'