SSO_MARKER is now standardized
This commit is contained in:
@@ -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\>[^]*?\<\/nosso\>/g, '');
|
||||
else return text.replace(/\<sso\>[^]*?\<\/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\>[^]*?\<\/nosso\>/g, '');
|
||||
else return text.replace(/\<sso\>[^]*?\<\/sso\>/g, '');
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user