mirror of
https://github.com/wassname/FanFicFare.git
synced 2026-09-12 12:02:50 +08:00
adastrafanfic can have chapters with tags (<i>) in them. Allow get as well as post.
This commit is contained in:
@@ -113,7 +113,9 @@ class Adastrafanfic(FanfictionSiteAdapter):
|
||||
for o in allOptions:
|
||||
# warning=5 bypasses 'are you old enough' checks.
|
||||
url = self.url + "&warning=5&chapter=%s" % o['value']
|
||||
title = o.string
|
||||
# ad astra can have tags, like <i> in chapter titles.
|
||||
title = "%s" % o
|
||||
title = re.sub('<[^>]+>','',title)
|
||||
result.append((url,title))
|
||||
|
||||
# warning=5 bypasses 'are you old enough' checks.
|
||||
|
||||
@@ -474,6 +474,8 @@ def replaceNotEntities(data):
|
||||
def removeEntities(text):
|
||||
# replace numeric versions of [&<>] with named versions.
|
||||
|
||||
if text is None:
|
||||
return text
|
||||
try:
|
||||
t = text.decode('utf-8')
|
||||
except UnicodeEncodeError, e:
|
||||
|
||||
Reference in New Issue
Block a user