Big cleanup part 2 (#58)

* Cleanup little-boxes stuff

* Force html5lib for parsing OG data

* Bugfixes
This commit is contained in:
Thomas Sileo
2019-08-04 16:34:30 +02:00
committed by GitHub
parent d38c43ebe8
commit a21121308f
11 changed files with 402 additions and 125 deletions

View File

@@ -23,7 +23,7 @@ def links_from_note(note):
links = set()
if "content" in note:
soup = BeautifulSoup(note["content"])
soup = BeautifulSoup(note["content"], "html5lib")
for link in soup.find_all("a"):
h = link.get("href")
if h.startswith("http") and h not in tags_href and is_url_valid(h):

View File

@@ -17,10 +17,10 @@ from little_boxes.activitypub import _to_list
from little_boxes.errors import ActivityGoneError
from little_boxes.errors import ActivityNotFoundError
from core.activitypub import _answer_key
from config import EMOJI_TPL
from config import ID
from config import MEDIA_CACHE
from core.activitypub import _answer_key
from utils import parse_datetime
from utils.media import Kind