From 225b541cb66fe125525c5ed4d436182445f43859 Mon Sep 17 00:00:00 2001 From: thomkeh <7741417+thomkeh@users.noreply.github.com> Date: Tue, 17 Jul 2018 16:52:26 +0100 Subject: [PATCH] No need to make values safe, no quotes around x509 name --- ovpn2onc.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ovpn2onc.html b/ovpn2onc.html index 1b22e54..c4e6a70 100644 --- a/ovpn2onc.html +++ b/ovpn2onc.html @@ -126,7 +126,7 @@ // closing tag was found // make sure the tag name and the contents are safe const name = makeSafe(xmlTag) - const value = makeSafe(xmlContent) + const value = xmlContent // store everything and reset the xml variables keys[name] = value ovpn[name] = name @@ -146,7 +146,7 @@ if (!match) continue // make sure everything is safe and then store it const key = makeSafe(match[1]) - const value = match[2] ? makeSafe((match[3] || '')) : true + const value = match[2] ? (match[3] || '') : true ovpn[key] = value } @@ -257,7 +257,7 @@ if (x509String.includes("'")) { // the name is quoted with ' const parts = x509String.split("'") - x509['Name'] = `'${parts[1]}'` + x509['Name'] = parts[1] if (parts[2]) { x509['Type'] = parts[2].trim() }