Skip to content

Commit

Permalink
MDL-21196 workaround for xhtml strict problems in phploader
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Dec 27, 2009
1 parent e29e464 commit 636365f
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions lib/ajax/ajaxlib.php
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,11 @@ protected function get_javascript_code($when, $indent = '') {
* @return string
*/
protected function get_yui3lib_headcode() {
return $this->yui3loader->css() . $this->yui3loader->script();
$code = $this->yui3loader->css() . $this->yui3loader->script();
// unfortunately yui loader does not produce xhtml strict code, so let's fix it for now
$code = str_replace('&', '&', $code);
$code = str_replace('&', '&', $code);
return $code;
}

/**
Expand All @@ -490,10 +494,13 @@ protected function get_yui3lib_headcode() {
public function get_yui2lib_code() {
// All YUI2 CSS is loaded automatically
if ($this->headdone) {
return $this->yui2loader->script_embed();
$code = $this->yui2loader->script_embed();
} else {
return $this->yui2loader->script();
$code = $this->yui2loader->script();
}
$code = str_replace('&', '&', $code);
$code = str_replace('&', '&', $code);
return $code;
}

/**
Expand Down

0 comments on commit 636365f

Please sign in to comment.