Skip to content
Snippets Groups Projects
Commit 77e72cb0 authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg
Browse files

Fixed the template of the metadata overview to use legal and unique ID...

Fixed the template of the metadata overview to use legal and unique ID attributes at the div elements by using base64 encoding of the header of the section concatenated with the entity ID. Also replacing '=' with '_' to be legal IDs.


git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@421 44740490-163a-0410-bde0-09ae8108e29a
parent a604a5e1
No related branches found
No related tags found
No related merge requests found
......@@ -12,7 +12,11 @@
echo '<h3>' . $header . '</h3>';
foreach ($list AS $entityid => $entity) {
$encodedEntityID = preg_replace('/=/', '_', base64_encode($entityid . $header));
$name = $entityid;
if (isset($entity['optional.found']['name'])) $name = $entity['optional.found']['name'];
......@@ -24,14 +28,14 @@
echo '<h4 style="padding-left: 2em; clear: both;" onclick="document.getElementById(\'metadatasection-' . $entityid . '\').style.display=\'block\';">' . htmlspecialchars($name) . '</h4>';
echo '<h4 style="padding-left: 2em; clear: both;" onclick="document.getElementById(\'metadatasection-' . $encodedEntityID . '\').style.display=\'block\';">' . htmlspecialchars($name) . '</h4>';
if ($warning) {
echo '<div><img src="/' . $baseurl . 'resources/icons/caution.png" style="float: left; margin-right: 1em" />';
echo 'Error in this metadata entry.</div>';
}
echo '<div id="metadatasection-' . $entityid . '" style="display: none">';
echo '<div id="metadatasection-' . $encodedEntityID . '" style="display: none">';
if (isset($entity['optional.found']['description'])) {
echo '<p>' . htmlspecialchars($entity['optional.found']['description']) . '</p>';
......
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