<schema>ADL SCORM</schema>
<schemaversion>2004 ' . $v . ' Edition</schemaversion>
</metadata>
- <organizations default="' . $this->_escapeAttr($this->getOrganization()) . '">
- <organization identifier="' . $this->_escapeAttr($this->getOrganization()) . '" adlseq:objectivesGlobalToSystem="false">
+ <organizations default="' . $this->_escapeAttr($this->_escapeOrganization($this->getOrganization())) . '">
+ <organization identifier="' . $this->_escapeAttr($this->_escapeOrganization($this->getOrganization())) . '" adlseq:objectivesGlobalToSystem="false">
<title>' . $this->_escape($this->getTitle()) . '</title>
<item identifier="' . $this->_escapeAttr($this->getReference()) . '" identifierref="' . $this->_escapeAttr($this->getReference()) . '_RES" isvisible="true">
<title>' . $this->_escape($this->getTitle()) . '</title>
<schema>ADL SCORM</schema>
<schemaversion>1.2</schemaversion>
</metadata>
- <organizations default="' . $this->_escapeAttr($this->getOrganization()) . '">
- <organization identifier="' . $this->_escapeAttr($this->getOrganization()) . '" structure="hierarchical">
+ <organizations default="' . $this->_escapeAttr($this->_escapeOrganization($this->getOrganization())) . '">
+ <organization identifier="' . $this->_escapeAttr($this->_escapeOrganization($this->getOrganization())) . '" structure="hierarchical">
<title>' . $this->_escape($this->getTitle()) . '</title>
<item identifier="' . $this->_escapeAttr($this->getReference()) . '" identifierref="' . $this->_escapeAttr($this->getReference()) . '_RES" isvisible="true">
<title>' . $this->_escape($this->getTitle()) . '</title>
return $res;
}
+ protected function _escapeOrganization($org)
+ {
+ return preg_replace('/[^a-z0-9_]/i', '', $org);
+ }
+
protected function _escape($string, $flags = ENT_XML1)
{
return htmlspecialchars($string, $flags);