Fixed out of bounds crash in HTML converter

This commit is contained in:
Veronica K. B. Olsen
2020-06-08 09:12:45 +02:00
parent c5b00ce0c0
commit 05014cb4c9
+1
View File
@@ -312,6 +312,7 @@ class ToHtml(Tokenizer):
refTags = [] refTags = []
if theBits[0] in nwLabels.KEY_NAME: if theBits[0] in nwLabels.KEY_NAME:
retText += "<span class='tags'>%s:</span>&nbsp;" % nwLabels.KEY_NAME[theBits[0]] retText += "<span class='tags'>%s:</span>&nbsp;" % nwLabels.KEY_NAME[theBits[0]]
if len(theBits) > 1:
if theBits[0] == nwKeyWords.TAG_KEY: if theBits[0] == nwKeyWords.TAG_KEY:
retText += "<a name='tag_%s'>%s</a>" % ( retText += "<a name='tag_%s'>%s</a>" % (
theBits[1], theBits[1] theBits[1], theBits[1]