You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by mj...@apache.org on 2021/03/30 14:28:16 UTC
svn commit: r1888220 - /httpd/site/trunk/content/security/cvejsontohtml.py
Author: mjc
Date: Tue Mar 30 14:28:16 2021
New Revision: 1888220
URL: http://svn.apache.org/viewvc?rev=1888220&view=rev
Log:
Replace newlines in the json description with new paragraphs in the html
Modified:
httpd/site/trunk/content/security/cvejsontohtml.py
Modified: httpd/site/trunk/content/security/cvejsontohtml.py
URL: http://svn.apache.org/viewvc/httpd/site/trunk/content/security/cvejsontohtml.py?rev=1888220&r1=1888219&r2=1888220&view=diff
==============================================================================
--- httpd/site/trunk/content/security/cvejsontohtml.py (original)
+++ httpd/site/trunk/content/security/cvejsontohtml.py Tue Mar 30 14:28:16 2021
@@ -96,7 +96,9 @@ for sectioncves in sections:
for e in sectioncves["cves"]:
html = "<dt><h3 id=\""+e['cveid']+"\">"+e['impact']+": <name name=\""+e['cveid']+"\">"+saxutils.escape(e['title'])+"</name>\n";
html += "(<a href=\"http://cve.mitre.org/cgi-bin/cvename.cgi?name="+e['cveid']+"\">"+e['cveid']+"</a>)</h3></dt>\n";
- html += "<dd><p>"+saxutils.escape(e['desc'])+"</p>\n"
+ desc = saxutils.escape(e['desc'])
+ desc = re.sub(r'\n','</p><p>', desc)
+ html += "<dd><p>"+desc+"</p>\n"
if (e['credit'] != ""): html += "<p>Acknowledgements: "+saxutils.escape(e['credit'])+"</p>\n"
html += "<table class=\"cve\">"
e['timetable'].append(["Affects",e['affects']]);