diff --git a/files/routes/posts.py b/files/routes/posts.py index 106cd6d3a..0febd9084 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -1080,9 +1080,9 @@ def get_post_title(v): if not content_type or "text/html" not in content_type: abort(400) # no you can't just parse html with reeeeeeeegex - match = html_title_regex.match(x.text) + match = html_title_regex.search(x.text) if match and match.lastindex >= 1: title = match.group(1) else: abort(400) - return {"url": url, "title": title.string} + return {"url": url, "title": title}