fix filtering in notificaitons/userpages
This commit is contained in:
parent
3eabdeafb9
commit
9d7ccf66d7
5 changed files with 9 additions and 18 deletions
|
@ -228,7 +228,6 @@ def post_id(pid, anything=None, v=None):
|
||||||
def edit_post(pid, v):
|
def edit_post(pid, v):
|
||||||
|
|
||||||
title = request.form.get("title")
|
title = request.form.get("title")
|
||||||
if "<" in title: return {"error": f"Titles can't contain <"}
|
|
||||||
|
|
||||||
p = get_post(pid)
|
p = get_post(pid)
|
||||||
|
|
||||||
|
@ -522,9 +521,6 @@ def submit_post(v):
|
||||||
title = request.form.get("title", "")
|
title = request.form.get("title", "")
|
||||||
url = request.form.get("url", "")
|
url = request.form.get("url", "")
|
||||||
|
|
||||||
if "<" in title:
|
|
||||||
return render_template("submit.html", v=v, error="Titles can't contain <", title=title[:500], url=url, body=request.form.get("body", "")), 400
|
|
||||||
|
|
||||||
if url:
|
if url:
|
||||||
repost = g.db.query(Submission).join(Submission.submission_aux).filter(
|
repost = g.db.query(Submission).join(Submission.submission_aux).filter(
|
||||||
SubmissionAux.url.ilike(url),
|
SubmissionAux.url.ilike(url),
|
||||||
|
|
|
@ -677,11 +677,6 @@ def settings_title_change(v):
|
||||||
|
|
||||||
new_name=request.form.get("title").strip()[:100]
|
new_name=request.form.get("title").strip()[:100]
|
||||||
|
|
||||||
if "<" in new_name:
|
|
||||||
return render_template("settings_profile.html",
|
|
||||||
v=v,
|
|
||||||
error=f"Flairs can't contain <")
|
|
||||||
|
|
||||||
#make sure name is different
|
#make sure name is different
|
||||||
if new_name==v.customtitle:
|
if new_name==v.customtitle:
|
||||||
return render_template("settings_profile.html",
|
return render_template("settings_profile.html",
|
||||||
|
|
|
@ -82,15 +82,15 @@
|
||||||
<span class="align-top">
|
<span class="align-top">
|
||||||
{% if c.parent_submission %}
|
{% if c.parent_submission %}
|
||||||
{% if c.author_id==v.id and c.child_comments and is_notification_page%}
|
{% if c.author_id==v.id and c.child_comments and is_notification_page%}
|
||||||
<span class="font-weight-bold">Comment {{'Replies' if (c.child_comments | length)>1 else 'Reply'}}: <a href="{{c.post.permalink}}">{{c.post.title | safe}}</a></span>
|
<span class="font-weight-bold">Comment {{'Replies' if (c.child_comments | length)>1 else 'Reply'}}: <a href="{{c.post.permalink}}">{{c.post.realtitle(v) | safe}}</a></span>
|
||||||
{% elif c.post.author_id==v.id and c.level == 1 and is_notification_page%}
|
{% elif c.post.author_id==v.id and c.level == 1 and is_notification_page%}
|
||||||
<span class="font-weight-bold">Post Reply: <a href="{{c.post.permalink}}">{{c.post.title | safe}}</a></span>
|
<span class="font-weight-bold">Post Reply: <a href="{{c.post.permalink}}">{{c.post.realtitle(v) | safe}}</a></span>
|
||||||
{% elif is_notification_page and c.parent_submission in v.subscribed_idlist() %}
|
{% elif is_notification_page and c.parent_submission in v.subscribed_idlist() %}
|
||||||
<span class="font-weight-bold">Subscribed Thread: <a href="{{c.post.permalink}}">{{c.post.title | safe}}</a></span>
|
<span class="font-weight-bold">Subscribed Thread: <a href="{{c.post.permalink}}">{{c.post.realtitle(v) | safe}}</a></span>
|
||||||
{% elif is_notification_page %}
|
{% elif is_notification_page %}
|
||||||
<span class="font-weight-bold">Username Mention: <a href="{{c.post.permalink}}">{{c.post.title | safe}}</a></span>
|
<span class="font-weight-bold">Username Mention: <a href="{{c.post.permalink}}">{{c.post.realtitle(v) | safe}}</a></span>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="font-weight-bold"><a href="{{c.post.permalink}}">{{c.post.title | safe}}</a></span>
|
<span class="font-weight-bold"><a href="{{c.post.permalink}}">{{c.post.realtitle(v) | safe}}</a></span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% elif c.author_id==1046 or c.author_id==2360 %}
|
{% elif c.author_id==1046 or c.author_id==2360 %}
|
||||||
<span class="font-weight-bold">{{'SITE_NAME' | app_config}} Notification</span>
|
<span class="font-weight-bold">{{'SITE_NAME' | app_config}} Notification</span>
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% else %}
|
{% else %}
|
||||||
<title>{{p.title | safe}} - {{'SITE_NAME' | app_config}}</title>
|
<title>{{p.title}} - {{'SITE_NAME' | app_config}}</title>
|
||||||
|
|
||||||
|
|
||||||
<meta property="og:article:author" content="{{'@'+p.author.username}}" />
|
<meta property="og:article:author" content="{{'@'+p.author.username}}" />
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
INSERT INTO public.badge_defs VALUES (6, 'Beta User', 'Joined during open beta', 'beta.png', 4, 3, NULL);
|
INSERT INTO public.badge_defs VALUES (6, 'Beta User', 'Joined during open beta', 'beta.png', 3, NULL);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue