Improvement in regex (#1431)
This commit is contained in:
parent
783349a39f
commit
31d3b1e77c
|
@ -60,7 +60,7 @@ setOrder = ->
|
||||||
|
|
||||||
# Function used to remove an OIDC consent
|
# Function used to remove an OIDC consent
|
||||||
removeOidcConsent = (partner) ->
|
removeOidcConsent = (partner) ->
|
||||||
r = new RegExp "\b#{partner}\b,?"
|
r = new RegExp "\b#{partner}\b,?", 'g'
|
||||||
datas['oidcConsents'] = datas['oidcConsents'].replace(r,'').replace(/,$/,'')
|
datas['oidcConsents'] = datas['oidcConsents'].replace(r,'').replace(/,$/,'')
|
||||||
setKey '_oidcConnectedRP', datas['oidcConsents']
|
setKey '_oidcConnectedRP', datas['oidcConsents']
|
||||||
# Success
|
# Success
|
||||||
|
|
|
@ -76,7 +76,7 @@ LemonLDAP::NG Portal jQuery scripts
|
||||||
|
|
||||||
removeOidcConsent = function(partner) {
|
removeOidcConsent = function(partner) {
|
||||||
var r;
|
var r;
|
||||||
r = new RegExp("\b" + partner + "\b,?");
|
r = new RegExp("\b" + partner + "\b,?", 'g');
|
||||||
datas['oidcConsents'] = datas['oidcConsents'].replace(r, '').replace(/,$/, '');
|
datas['oidcConsents'] = datas['oidcConsents'].replace(r, '').replace(/,$/, '');
|
||||||
return setKey('_oidcConnectedRP', datas['oidcConsents'], function() {
|
return setKey('_oidcConnectedRP', datas['oidcConsents'], function() {
|
||||||
return $("[partner='" + partner + "']").hide();
|
return $("[partner='" + partner + "']").hide();
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user