forked from rDrama/rDrama
fds
parent
cf886f13d1
commit
0705e96770
|
@ -270,8 +270,8 @@ def sanitize(sanitized, alert=False, comment=False, edit=False):
|
||||||
|
|
||||||
url = urlparse(href)
|
url = urlparse(href)
|
||||||
domain = url.netloc
|
domain = url.netloc
|
||||||
path = url.path
|
url_path = url.path
|
||||||
domain_list.add(domain+path)
|
domain_list.add(domain+url_path)
|
||||||
|
|
||||||
parts = domain.split(".")
|
parts = domain.split(".")
|
||||||
for i in range(len(parts)):
|
for i in range(len(parts)):
|
||||||
|
|
|
@ -160,13 +160,6 @@ def searchposts(v):
|
||||||
|
|
||||||
posts = get_posts(ids, v=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]}
|
if request.headers.get("Authorization"): return {"total":total, "data":[x.json for x in posts]}
|
||||||
|
|
||||||
return render_template("search.html",
|
return render_template("search.html",
|
||||||
|
@ -177,9 +170,7 @@ def searchposts(v):
|
||||||
listing=posts,
|
listing=posts,
|
||||||
sort=sort,
|
sort=sort,
|
||||||
t=t,
|
t=t,
|
||||||
next_exists=next_exists,
|
next_exists=next_exists
|
||||||
domain=domain,
|
|
||||||
domain_obj=domain_obj
|
|
||||||
)
|
)
|
||||||
|
|
||||||
@app.get("/search/comments")
|
@app.get("/search/comments")
|
||||||
|
|
Loading…
Reference in New Issue