Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed a storic problem with & during package import

NOW Moodle full support prerequisites
  • Loading branch information...
commit 18a742f9c679d9f7f02d2e09a071f67d03b66013 1 parent 822d3bf
bobopinna authored

Showing 1 changed file with 8 additions and 2 deletions. Show diff stats Hide diff stats

  1. +8 2 mod/scorm/locallib.php
10 mod/scorm/locallib.php
@@ -1005,9 +1005,15 @@ function scorm_parse_scorm($pkgdir,$scormid) {
1005 1005
1006 1006 if (is_file($manifestfile)) {
1007 1007
1008   - $xmlstring = file_get_contents($manifestfile);
  1008 + $xmltext = file_get_contents($manifestfile);
  1009 +
  1010 + $pattern = '/&(?!\w{2,6};)/';
  1011 + $replacement = '&';
  1012 +
  1013 + $xmltext = preg_replace($pattern, $replacement, $xmltext);
  1014 +
1009 1015 $objXML = new xml2Array();
1010   - $manifests = $objXML->parse($xmlstring);
  1016 + $manifests = $objXML->parse($xmltext);
1011 1017 // print_r($manifests);
1012 1018 $scoes = new stdClass();
1013 1019 $scoes->version = '';

0 comments on commit 18a742f

Please sign in to comment.
Something went wrong with that request. Please try again.