Skip to content

Commit 98eb64b

Browse files
pbuehlerktf
authored andcommitted
To write < and > in html use &lt; and &gt;
1 parent 2a3635b commit 98eb64b

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

scripts/datamodel-doc/ALICEO2includeFile.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,13 @@ def print(self):
167167
def printHTML(self):
168168
cn2u = fullDataModelName(self.nslevel, self.cname)
169169
cn2u = cn2u.replace(":collision",":&zwnj;collision")
170+
# replace < by &lt; and > by &gt;
171+
ty2u = self.type.replace("<","&lt;").replace(">","&gt;")
170172
print(" <tr>")
171173
print(" <td>"+cn2u+"</td>")
172174
print(" <td>"+columnTypes(1)[self.kind]+"</td>")
173175
print(" <td>"+self.gname+"</td>")
174-
print(" <td>"+self.type+"</td>")
176+
print(" <td>"+ty2u+"</td>")
175177
print(" <td>"+self.comment+"</td>")
176178
print(" </tr>")
177179

0 commit comments

Comments
 (0)