re_srchasver = re.compile(r"^(\S+)\s+\((\S+)\)$")
+html_escaping = {'"':'"', '&':'&', '<':'<', '>':'>'}
+re_html_escaping = re.compile('|'.join(map(re.escape, html_escaping.keys())))
+
default_config = "/etc/dak/dak.conf"
default_apt_config = "/etc/dak/apt.conf"
################################################################################
+def html_escape(s):
+ return re_html_escaping.sub(lambda x: html_escaping.get(x.group(0)), s)
+
+################################################################################
+
def open_file(filename, mode='r'):
try:
f = open(filename, mode)