aboutsummaryrefslogtreecommitdiff
path: root/cgi
diff options
context:
space:
mode:
authorLibravatar Choom 2022-12-14 21:18:29 -0300
committerLibravatar Choom 2022-12-14 21:42:49 -0300
commit7a4f14b0992621bf6df944d086d65a6b4476f33d (patch)
treed1c60128fa53de5d83c57c725024fc9a34cdb7de /cgi
parentdcd6e1d63a46ff957ce6eb519915b4a9e8fe625b (diff)
downloadweabot-7a4f14b0992621bf6df944d086d65a6b4476f33d.tar.gz
weabot-7a4f14b0992621bf6df944d086d65a6b4476f33d.tar.xz
weabot-7a4f14b0992621bf6df944d086d65a6b4476f33d.zip
Fix fortunas
Diffstat (limited to 'cgi')
-rw-r--r--cgi/framework.py2
-rw-r--r--cgi/manage.py6
-rw-r--r--cgi/templates/manage/quotes.html11
3 files changed, 10 insertions, 9 deletions
diff --git a/cgi/framework.py b/cgi/framework.py
index 1a2d78e..6056a30 100644
--- a/cgi/framework.py
+++ b/cgi/framework.py
@@ -296,7 +296,7 @@ class UserError(Exception):
def secure_filename(path):
split = re.compile(r'[\0%s]' % re.escape(
''.join([os.path.sep, os.path.altsep or ''])))
- return cgi.escape(split.sub('', path))
+ return html.escape(split.sub('', path))
def getMD5b(data):
m = hashlib.md5()
diff --git a/cgi/manage.py b/cgi/manage.py
index 0cf2f66..0abb832 100644
--- a/cgi/manage.py
+++ b/cgi/manage.py
@@ -1550,7 +1550,7 @@ def manage(self, path_split):
'trip': filt['from_trip'],
'where': where,
'action': filt['action'],
- 'changeto': cgi.escape(filt['to'], True),
+ 'changeto': html.escape(filt['to'], True),
'reason': filt['reason'],
'seconds': filt['seconds'],
'blind': filt['blind'],
@@ -1669,7 +1669,7 @@ def manage(self, path_split):
template_filename = "message.html"
try:
f = open('quotes.conf', 'r')
- data = cgi.escape(f.read(1048576), True)
+ data = html.escape(f.read(1048576), True)
f.close()
template_filename = "quotes.html"
template_values = {'data': data}
@@ -1762,7 +1762,7 @@ def manage(self, path_split):
try:
# Cut long lines
message = self.formdata["message"]
- message = clickableURLs(cgi.escape(message).rstrip()[0:8000])
+ message = clickableURLs(html.escape(message).rstrip()[0:8000])
message = onlyAllowedHTML(message)
if Settings.USE_MARKDOWN:
message = markdown(message)
diff --git a/cgi/templates/manage/quotes.html b/cgi/templates/manage/quotes.html
index d30a403..f45a095 100644
--- a/cgi/templates/manage/quotes.html
+++ b/cgi/templates/manage/quotes.html
@@ -1,11 +1,12 @@
<?py include('templates/base_top.html') ?>
<?py include('templates/manage/menu.html') ?>
<center>
- <div class="replymode">Quotes</div>
- <p>Ingresa un mensaje a mostrar por cada linea:</p>
- <form method="post" action="">
- <textarea name="data" cols="80" rows="15" style="width:500px;height:250px;">${data}</textarea><br />
- <input type="submit" name="save" style="width:500px;" value="Guardar" />
+ <div class="replymode">Fortunas</div>
+ <p>Ingresa un mensaje a mostrar por cada lĂ­nea:</p>
+ <form method="post" action="" style="max-width:500px;">
+ <textarea name="data" cols="80" rows="15" style="width:100%;height:300px;">${data}</textarea>
+ <br />
+ <input type="submit" name="save" style="width:100%;" value="Guardar" />
</form>
</center>
<hr />