Skip to content
Snippets Groups Projects
Commit 710afa6f authored by Olav Morken's avatar Olav Morken
Browse files

SAML2: Fix generation of mdui:Keyword with ampersand in keyword.

Same problem as fixed in r3241.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@3242 44740490-163a-0410-bde0-09ae8108e29a
parent 1418c5a8
No related branches found
No related tags found
No related merge requests found
......@@ -63,14 +63,15 @@ class SAML2_XML_mdui_Keywords {
$e = $doc->createElementNS(SAML2_XML_mdui_UIInfo::NS, 'mdui:Keywords');
$e->setAttribute('xml:lang', $this->lang);
$e->nodeValue = '';
$value = '';
foreach ($this->Keywords as $keyword) {
if (strpos($keyword, "+") !== false) {
throw new Exception('Keywords may not contain a "+" character.');
}
$e->nodeValue .= str_replace(' ', '+', $keyword) . ' ';
$value .= str_replace(' ', '+', $keyword) . ' ';
}
$e->nodeValue = rtrim($e->nodeValue);
$value = rtrim($value);
$e->appendChild($doc->createTextNode($value));
$parent->appendChild($e);
return $e;
......
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