Browse files

Fixed a problem with altered chars in UTF-8

  • Loading branch information...
1 parent f32e476 commit 644b5629fff5d094d9f8cf3d28aacb65d8d4e498 bobopinna committed Jul 3, 2005
Showing with 6 additions and 2 deletions.
  1. +6 −2 mod/scorm/lib.php
View
8 mod/scorm/lib.php
@@ -579,6 +579,9 @@ function scorm_startElement($parser, $name, $attrs) {
function scorm_endElement($parser, $name) {
global $scoes,$i,$level,$datacontent,$manifest,$organization,$version;
+
+ $datacontent = trim($datacontent);
+
if ($name == 'ITEM') {
$level--;
}
@@ -618,11 +621,12 @@ function scorm_endElement($parser, $name) {
$version = 'SCORM_1.2';
}
}
-}
+ $datacontent = '';
+}
function scorm_characterData($parser, $data) {
global $datacontent;
- $datacontent = utf8_decode($data);
+ $datacontent .= utf8_decode($data);
}
function scorm_parse($pkgdir,$pkgtype,$scormid){

0 comments on commit 644b562

Please sign in to comment.