Skip to content
Snippets Groups Projects
Commit 18e94d8e authored by Guillaume ROUSSE's avatar Guillaume ROUSSE
Browse files

use plain string comparaison instead of regexp

parent 1a4563f0
No related branches found
No related tags found
No related merge requests found
......@@ -56,7 +56,7 @@ sub parse {
## Ignoringnodes of type XML::LibXML::Text or XML::LibXML::Comment
next unless $child->nodeType() == XML_ELEMENT_NODE;
if ($child->nodeName =~ /IDPSSODescriptor$/) {
if ($child->localname() eq 'IDPSSODescriptor') {
$data->{type} = 'idp';
......@@ -81,7 +81,7 @@ sub parse {
push @{ $data->{domain} }, $scope->textContent();
}
} elsif ($child->nodeName =~ /SPSSODescriptor$/) {
} elsif ($child->localname() eq 'SPSSODescriptor') {
$data->{type} = 'sp';
......@@ -126,7 +126,7 @@ sub parse {
};
}
} elsif ($child->nodeName =~ /Extensions$/) {
} elsif ($child->localname() eq 'Extensions') {
foreach my $registrationinfo (
$child->getElementsByLocalName('RegistrationInfo'))
......@@ -151,7 +151,7 @@ sub parse {
}
}
}
} elsif ($child->nodeName =~ /ContactPerson$/) {
} elsif ($child->localname() eq 'ContactPerson') {
my %contact_details;
$contact_details{type} = $child->getAttribute('contactType');
if (defined $contact_details{type}) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment