diff --git a/files/routes/posts.py b/files/routes/posts.py index c7d6965ab..ff8e173eb 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -228,7 +228,6 @@ def post_id(pid, anything=None, v=None): def edit_post(pid, v): title = request.form.get("title") - if "<" in title: return {"error": f"Titles can't contain <"} p = get_post(pid) @@ -522,9 +521,6 @@ def submit_post(v): title = request.form.get("title", "") 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: repost = g.db.query(Submission).join(Submission.submission_aux).filter( SubmissionAux.url.ilike(url), diff --git a/files/routes/settings.py b/files/routes/settings.py index a47c5efa2..6055523eb 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -677,11 +677,6 @@ def settings_title_change(v): 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 if new_name==v.customtitle: return render_template("settings_profile.html", diff --git a/files/templates/comments.html b/files/templates/comments.html index 2a2f4527e..8fe6e1bbb 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -82,15 +82,15 @@ {% if c.parent_submission %} {% if c.author_id==v.id and c.child_comments and is_notification_page%} - Comment {{'Replies' if (c.child_comments | length)>1 else 'Reply'}}: {{c.post.title | safe}} + Comment {{'Replies' if (c.child_comments | length)>1 else 'Reply'}}: {{c.post.realtitle(v) | safe}} {% elif c.post.author_id==v.id and c.level == 1 and is_notification_page%} - Post Reply: {{c.post.title | safe}} + Post Reply: {{c.post.realtitle(v) | safe}} {% elif is_notification_page and c.parent_submission in v.subscribed_idlist() %} - Subscribed Thread: {{c.post.title | safe}} + Subscribed Thread: {{c.post.realtitle(v) | safe}} {% elif is_notification_page %} - Username Mention: {{c.post.title | safe}} + Username Mention: {{c.post.realtitle(v) | safe}} {% else %} - {{c.post.title | safe}} + {{c.post.realtitle(v) | safe}} {% endif %} {% elif c.author_id==1046 or c.author_id==2360 %} {{'SITE_NAME' | app_config}} Notification @@ -511,4 +511,4 @@ - \ No newline at end of file + diff --git a/files/templates/submission.html b/files/templates/submission.html index ea67d7001..5152dc213 100644 --- a/files/templates/submission.html +++ b/files/templates/submission.html @@ -52,7 +52,7 @@ {% endif %} {% else %} -{{p.title | safe}} - {{'SITE_NAME' | app_config}} +{{p.title}} - {{'SITE_NAME' | app_config}} @@ -634,4 +634,4 @@ {% include "gif_modal.html" %} {% include "emoji_modal.html" %} {% endif %} -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/seed-db.sql b/seed-db.sql index fc88b293a..8518cc292 100644 --- a/seed-db.sql +++ b/seed-db.sql @@ -1 +1,42 @@ -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); + +INSERT INTO public.users ( + id, username, passhash, created_utc, admin_level, over_18, is_activated, bio, bio_html, login_nonce, is_private, + unban_utc, original_username, customtitle, defaultsorting, defaulttime, namecolor, titlecolor, profileurl, bannerurl, + customtitleplain, themecolor, changelogsub, oldreddit, css, profilecss, coins, agendaposter, suicide_utc, + post_count, comment_count, background, verified +) VALUES (1046, 'Drama', '', 0, 0, true, true, '', '', 0, false, + 0, 'Drama', '', 'hot', 'day', 'ff66ac', 'ff66ac', '', '', + '', 'ff66ac', false, false, '', '', 0, false, 0, + 0, 0, '', true); + +INSERT INTO public.users ( + id, username, passhash, created_utc, admin_level, over_18, is_activated, bio, bio_html, login_nonce, is_private, + unban_utc, original_username, customtitle, defaultsorting, defaulttime, namecolor, titlecolor, profileurl, bannerurl, + customtitleplain, themecolor, changelogsub, oldreddit, css, profilecss, coins, agendaposter, suicide_utc, + post_count, comment_count, background, verified +) VALUES (2360, 'AutoJanny', '', 0, 0, true, true, '', '', 0, false, + 0, 'AutoJanny', '', 'hot', 'day', 'ff66ac', 'ff66ac', '', '', + '', 'ff66ac', false, false, '', '', 0, false, 0, + 0, 0, '', true); + +INSERT INTO public.users ( + id, username, passhash, created_utc, admin_level, over_18, is_activated, bio, bio_html, login_nonce, is_private, + unban_utc, original_username, customtitle, defaultsorting, defaulttime, namecolor, titlecolor, profileurl, bannerurl, + customtitleplain, themecolor, changelogsub, oldreddit, css, profilecss, coins, agendaposter, suicide_utc, + post_count, comment_count, background, verified +) VALUES (2317, 'Sneethe', '', 0, 0, true, true, '', '', 0, false, + 0, 'Sneethe', '', 'hot', 'day', '30409f', '30409f', '', '', + '', '30409f', false, false, '', '', 0, false, 0, + 0, 0, '', true); + +INSERT INTO public.users ( + id, username, passhash, created_utc, admin_level, over_18, is_activated, bio, bio_html, login_nonce, is_private, + unban_utc, original_username, customtitle, defaultsorting, defaulttime, namecolor, titlecolor, profileurl, bannerurl, + customtitleplain, themecolor, changelogsub, oldreddit, css, profilecss, coins, agendaposter, suicide_utc, + post_count, comment_count, background, verified +) VALUES (261, 'Snappy', '', 0, 0, true, true, '', '', 0, false, + 0, 'Snappy', '', 'hot', 'day', '62ca56', 'e4432d', '', '', + '', '30409f', false, false, '', '', 0, false, 0, + 0, 0, '', true); +