From: Sam Hemelryk Date: Mon, 4 Jan 2010 02:53:47 +0000 (+0000) Subject: output MDL-21232 image now checks to see if passed url var is a moodle_url to avoid... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=ada38fad4fd848275326d03795b62f32c2eeea4f;p=moodle.git output MDL-21232 image now checks to see if passed url var is a moodle_url to avoid bad image src attribute --- diff --git a/lib/outputrenderers.php b/lib/outputrenderers.php index 4e132f329f..7ce33f3ef5 100644 --- a/lib/outputrenderers.php +++ b/lib/outputrenderers.php @@ -1283,7 +1283,9 @@ class core_renderer extends renderer_base { if ($image_or_url instanceof html_image) { $image = clone($image_or_url); } else { - if (strpos($image_or_url, 'http')) { + if ($image_or_url instanceof moodle_url) { + $url = &$image_or_url; + } else if (strpos($image_or_url, 'http')) { $url = new moodle_url($image_or_url); } else { $url = $this->pix_url($image_or_url, 'moodle');