From 1bc7606b1dbd1dbd83ea2d83892073c3f77948b3 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Fri, 3 May 2013 23:13:02 -0400 Subject: [PATCH] Strip code, like wikilinks, from case titles in the chart. --- tasks/drn_clerkbot.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tasks/drn_clerkbot.py b/tasks/drn_clerkbot.py index f8244da..995994a 100644 --- a/tasks/drn_clerkbot.py +++ b/tasks/drn_clerkbot.py @@ -26,6 +26,7 @@ import re from threading import RLock from time import mktime, sleep, time +from mwparserfromhell import parse as mw_parse import oursql from earwigbot import exceptions @@ -713,6 +714,7 @@ class DRNClerkBot(Task): case["volunteer_sortkey"] = int(mktime(case["case_volunteer_time"].timetuple())) data += "|mu={case_modify_user}|ms={modify_sortkey}|mt={modify_time}" + case["case_title"] = mw_parse(case["case_title"]).strip_code() title = case["case_title"].replace("_", " ").replace("|", "|") case["title"] = title[:47] + "..." if len(title) > 50 else title case["file_time"] = self.format_time(case["case_file_time"])