diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/_news_colors.py | 3 | ||||
-rwxr-xr-x | tools/tmx_converter.py | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/tools/_news_colors.py b/tools/_news_colors.py index 8b0c00b9..e98f73bf 100644 --- a/tools/_news_colors.py +++ b/tools/_news_colors.py @@ -20,6 +20,8 @@ ## You should have received a copy of the GNU General Public License ## along with this program. If not, see <http://www.gnu.org/licenses/>. +import cgi + __all__ = ['make_html_colors_dict', 'make_txt_colors_dict'] class Color(object): @@ -49,6 +51,7 @@ class HtmlDate(object): class HtmlLink(object): __slots__ = () def __format__(self, target): + target = cgi.escape(target, True) return '<a href="%s">%s</a>' % (target, target) class HtmlSignature(object): diff --git a/tools/tmx_converter.py b/tools/tmx_converter.py index 94cf0b2c..009a1145 100755 --- a/tools/tmx_converter.py +++ b/tools/tmx_converter.py @@ -289,7 +289,7 @@ class ContentHandler(xml.sax.ContentHandler): self.state = State.FINAL def endDocument(self): - self.mobs.write('\n\n%s.gat,0,0,0|script|Mob%s|-1,{\n' % (self.base, self.base)) + self.mobs.write('\n\n%s.gat,0,0,0|script|Mob%s|-1,\n{\n' % (self.base, self.base)) for mob_id in sorted(self.mob_ids): self.mobs.write('On%d:\n set @mobID, %d;\n callfunc "MobPoints";\n end;\n\n' % (mob_id, mob_id)) self.mobs.write(' end;\n}\n') |