mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-27 10:17:45 +08:00
Modify airframe gen to use html.escape
This commit is contained in:
committed by
Lorenz Meier
parent
d2eefbf2fb
commit
59a1148aec
@@ -1,6 +1,7 @@
|
|||||||
from xml.sax.saxutils import escape
|
from xml.sax.saxutils import escape
|
||||||
import codecs
|
import codecs
|
||||||
import os
|
import os
|
||||||
|
import html
|
||||||
|
|
||||||
class MarkdownTablesOutput():
|
class MarkdownTablesOutput():
|
||||||
def __init__(self, groups, board, image_path):
|
def __init__(self, groups, board, image_path):
|
||||||
@@ -89,7 +90,7 @@ class MarkdownTablesOutput():
|
|||||||
maintainer = param.GetMaintainer()
|
maintainer = param.GetMaintainer()
|
||||||
maintainer_entry = ''
|
maintainer_entry = ''
|
||||||
if maintainer != '':
|
if maintainer != '':
|
||||||
maintainer_entry = '<p>Maintainer: %s</p>' % (maintainer.replace('<', '<').replace('>', '>'))
|
maintainer_entry = '<p>Maintainer: %s</p>' % (html.escape(maintainer))
|
||||||
url = param.GetFieldValue('url')
|
url = param.GetFieldValue('url')
|
||||||
name_anchor='id="%s_%s_%s"' % (group.GetClass(),group.GetName(),name)
|
name_anchor='id="%s_%s_%s"' % (group.GetClass(),group.GetName(),name)
|
||||||
name_anchor=name_anchor.replace(' ','_').lower()
|
name_anchor=name_anchor.replace(' ','_').lower()
|
||||||
|
|||||||
Reference in New Issue
Block a user