Skip to content

Commit

Permalink
fix zaproxy
Browse files Browse the repository at this point in the history
  • Loading branch information
Kacper committed Nov 3, 2024
1 parent 3cc007b commit 81a755a
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions src/app/dialog-import/dialog-import.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1471,6 +1471,22 @@ export class DialogImportComponent implements OnInit {
return severity
}

function parseit(text) {
var html = text;
var div = document.createElement("div");
div.innerHTML = html;
text = div.textContent || div.innerText || "";
return text
}
function parseref(text) {

text = text.replaceAll('</p><p>', '</p>\n<p>')
var html = text;
var div = document.createElement("div");
div.innerHTML = html;
text = div.textContent || div.innerText || "";
return text
}
const arr = [];
for (const [key, value] of Object.entries(data.site)) {

Expand All @@ -1482,13 +1498,17 @@ export class DialogImportComponent implements OnInit {
scopedesc = "Request header:\n" + subvalue['instances'][0]['method'] + " " + subvalue['instances'][0]['uri'];
}





const def = {
title: subvalue['alert'],
poc: scopedesc,
files: [],
desc: subvalue['desc'] + "\n\n" + subvalue['otherinfo'],
desc: parseit(subvalue['desc']) + "\n\n" + parseit(subvalue['otherinfo']),
severity: setseverity(subvalue['riskcode']),
ref: subvalue['reference'],
ref: parseref(subvalue['reference']),
status: 1,
cvss: '',
cvss_vector: '',
Expand Down

0 comments on commit 81a755a

Please sign in to comment.