Metadata parser: Clean up output.
git-svn-id: http://simplesamlphp.googlecode.com/svn/trunk@1396 44740490-163a-0410-bde0-09ae8108e29a
This commit is contained in:
parent
8f4ed788dc
commit
03dec63343
|
@ -11,7 +11,7 @@ $this->includeAtTemplateBase('includes/header.php');
|
|||
|
||||
<p><?php echo($this->t('{admin:metaconv_xmlmetadata}')); ?></p>
|
||||
<p>
|
||||
<textarea rows="20" cols="75" name="xmldata"><?php echo htmlspecialchars($this->data['xmldata']); ?></textarea>
|
||||
<textarea rows="20" cols="120" name="xmldata"><?php echo htmlspecialchars($this->data['xmldata']); ?></textarea>
|
||||
</p>
|
||||
<p>
|
||||
<input type="submit" value="<?php echo $this->t('metaconv_parse'); ?>" />
|
||||
|
@ -32,7 +32,7 @@ if($output !== NULL) {
|
|||
}
|
||||
|
||||
echo('<h3>' . htmlspecialchars($type) . '</h3>' . "\n");
|
||||
echo('<pre>' . htmlspecialchars($text) . '</pre>' . "\n");
|
||||
echo('<pre class="metadatabox">' . htmlspecialchars($text) . '</pre>' . "\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -39,8 +39,13 @@ try {
|
|||
continue;
|
||||
}
|
||||
|
||||
$text .= '$metadata[\'' . addslashes($entityId) . '\'] = ' .
|
||||
var_export($entityMetadata, TRUE) . ';' . "\n";
|
||||
/* Remove the entityDescriptor element because it is unused, and only
|
||||
* makes the output harder to read.
|
||||
*/
|
||||
unset($entityMetadata['entityDescriptor']);
|
||||
|
||||
$text .= var_export($entityId, TRUE) . ' => ' .
|
||||
var_export($entityMetadata, TRUE) . ",\n";
|
||||
}
|
||||
|
||||
$entities = $text;
|
||||
|
|
Reference in New Issue