From b9973d69c362ac4652f0d7c21b0cb3ed1cf164b3 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Sat, 8 Aug 2020 17:58:04 -0700 Subject: [PATCH] SSO_MARKER is now standardized --- src/js/index.js | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/js/index.js b/src/js/index.js index 6ab254f29..d514b7a48 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -387,21 +387,13 @@ app.filter('prettyEmailAddresses', function () { }); app.filter('postInstallMessage', function () { - var SSO_MARKER = '=== sso ==='; - return function (text, app) { if (!text) return ''; if (!app) return text; - var parts = text.split(SSO_MARKER); - if (parts.length === 1) { - // [^] matches even newlines. '?' makes it non-greedy - if (app.sso) return text.replace(/\[^]*?\<\/nosso\>/g, ''); - else return text.replace(/\[^]*?\<\/sso\>/g, ''); - } - - if (app.sso) return parts[1]; - else return parts[0]; + // [^] matches even newlines. '?' makes it non-greedy + if (app.sso) return text.replace(/\[^]*?\<\/nosso\>/g, ''); + else return text.replace(/\[^]*?\<\/sso\>/g, ''); }; });