fds
This commit is contained in:
parent
34cf0411f5
commit
9f5e77139e
2 changed files with 3 additions and 12 deletions
|
@ -270,8 +270,8 @@ def sanitize(sanitized, alert=False, comment=False, edit=False):
|
|||
|
||||
url = urlparse(href)
|
||||
domain = url.netloc
|
||||
path = url.path
|
||||
domain_list.add(domain+path)
|
||||
url_path = url.path
|
||||
domain_list.add(domain+url_path)
|
||||
|
||||
parts = domain.split(".")
|
||||
for i in range(len(parts)):
|
||||
|
|
|
@ -160,13 +160,6 @@ def searchposts(v):
|
|||
|
||||
posts = get_posts(ids, v=v)
|
||||
|
||||
if v and v.admin_level>3 and "domain" in criteria:
|
||||
domain=criteria['domain']
|
||||
domain_obj=get_domain(domain)
|
||||
else:
|
||||
domain=None
|
||||
domain_obj=None
|
||||
|
||||
if request.headers.get("Authorization"): return {"total":total, "data":[x.json for x in posts]}
|
||||
|
||||
return render_template("search.html",
|
||||
|
@ -177,9 +170,7 @@ def searchposts(v):
|
|||
listing=posts,
|
||||
sort=sort,
|
||||
t=t,
|
||||
next_exists=next_exists,
|
||||
domain=domain,
|
||||
domain_obj=domain_obj
|
||||
next_exists=next_exists
|
||||
)
|
||||
|
||||
@app.get("/search/comments")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue