Allow a default statement if our page is not for a specific base version
[openssl-web.git] / bin / mk-cvepage
index 83333ab414cc9950b6c7ab9de71ba568c1c2f230..abed8b469efafe52199002086f2ec5db7433c012 100755 (executable)
@@ -138,12 +138,13 @@ for base in allyourbase(dom):
         bases.append( "<a href=\"vulnerabilities-%s.html\">%s</a>" %(base,base))
 preface += "<p>Show issues fixed only in OpenSSL " + ", ".join(bases)
 if options.base:
-    preface += ", or <a href=\"vulnerabilities.html\">all versions</a>"
+    preface += ", or <a href=\"vulnerabilities.html\">all versions</a></p>"
     preface += "<h2>Fixed in OpenSSL %s</h2>" %(options.base)
-    for statement in dom.getElementsByTagName('statement'):
-        if (statement.getAttribute("base") in options.base):
-            preface += statement.firstChild.data.strip()
-preface += "</p>"
+else:
+    preface += "</p>"
+for statement in dom.getElementsByTagName('statement'):
+    if (statement.getAttribute("base") in (options.base or "none")):
+        preface += "<p>"+statement.firstChild.data.strip()+"</p>"
 if len(allyears)>1: # If only vulns in this year no need for the year table of contents
     preface += "<p><a name=\"toc\">Jump to year: </a>" + ", ".join( "<a href=\"#y%s\">%s</a>" %(year,year) for year in allyears)
 preface += "</p>"