Remove html_escape() and use the standard html library instead.

This commit is contained in:
parazyd 2018-09-26 19:27:01 +02:00
parent cff9839d83
commit 055933c5d1
No known key found for this signature in database
GPG Key ID: F0CB28FCF78637DE
1 changed files with 2 additions and 13 deletions

View File

@ -5,22 +5,11 @@ Module for backend talk with Jenkins executed by the web/CGI
from argparse import ArgumentParser
from subprocess import run
import html
from config import (jarargs, jobpath)
def html_escape(string):
"""
Function for escaping certain symbols to XML-compatible sequences.
"""
html_codes = [("'", '''), ('"', '"'), ('&', '&'),
('<', '&lt;'), ('>', '&gt;')]
for i in html_codes:
string = string.replace(i[0], i[1])
return string
def add_job(jobname):
"""
Function for adding a job to Jenkins.
@ -40,7 +29,7 @@ def add_job(jobname):
zshcmd = 'load devuan %s' % (blendfile)
command = "zsh -f -c 'source sdk && %s && build_image_dist'" % zshcmd
command = html_escape(command)
command = html.escape(command)
replacements = [('DESC', desc),
('SDK', sdk),