return $str;
}
-function hotpot_convert_relative_url($baseurl, $filename, $opentag, $url, $closetag, $stripslashes=true) {
- if ($stripslashes) {
- $opentag = stripslashes($opentag);
- $url = stripslashes($url);
- $closetag = stripslashes($closetag);
- }
-
+function hotpot_convert_relative_url($baseurl, $filename, $opentag, $url, $closetag, $depricated=true) {
// catch <PARAM name="FlashVars" value="TheSound=soundfile.mp3">
// ampersands can appear as "&", "&" or "&#x0026;amp;"
if (preg_match('|^'.'\w+=[^&]+'.'('.'&((amp;#x0026;)?amp;)?'.'\w+=[^&]+)*'.'$|', $url)) {
return $url;
}
-function hotpot_convert_url($baseurl, $filename, $url, $stripslashes=true) {
+function hotpot_convert_url($baseurl, $filename, $url, $depricated=true) {
// maintain a cache of converted urls
static $HOTPOT_RELATIVE_URLS = array();
- if ($stripslashes) {
- $url = stripslashes($url);
- }
-
// is this an absolute url? (or javascript pseudo url)
if (preg_match('%^(http://|/|javascript:)%i', $url)) {
// do nothing
// results are first written into string (and then to a file)
$count++;
- echo "<hr /><p><b>$count</b>. ".stripslashes($question->questiontext)."</p>";
+ echo "<hr /><p><b>$count</b>. ".$question->questiontext."</p>";
$expout = $this->writequestion( $question , null, true, $path) . "\n";
$expout = $this->presave_process( $expout );
$qo->image = $this->getpath( $question, array('#','image',0,'#'), $qo->image );
$image_base64 = $this->getpath( $question, array('#','image_base64','0','#'),'' );
if (!empty($image_base64)) {
- $qo->image = $this->importimagefile( $qo->image, stripslashes($image_base64) );
+ $qo->image = $this->importimagefile( $qo->image, $image_base64);
}
$qo->generalfeedback = $this->getpath( $question, array('#','generalfeedback',0,'#','text',0,'#'), $qo->generalfeedback, true );
$qo->defaultgrade = $this->getpath( $question, array('#','defaultgrade',0,'#'), $qo->defaultgrade );
}
if ($correctanswer) {
$feedback = '<div class="correctness">';
- $feedback .= get_string('correctansweris', 'quiz', s($correctanswer, true));
+ $feedback .= get_string('correctansweris', 'quiz', s($correctanswer));
$feedback .= '</div>';
// $strfeedbackwrapped = get_string('correctanswer and', 'quiz').get_string('feedback', 'quiz');
}
*/
echo "<input $style $readonly $popup name=\"$inputname\"";
- echo " type=\"text\" value=\"".s($response, true)."\" ".$styleinfo." /> ";
+ echo " type=\"text\" value=\"".s($response)."\" ".$styleinfo." /> ";
if (!empty($feedback) && !empty($USER->screenreader)) {
echo "<img src=\"$CFG->pixpath/i/feedback.gif\" alt=\"$feedback\" />";
}
$selected = ' selected="selected"';
}
$outputoptions .= "<option value=\"$mcanswer->id\"$selected>" .
- s($mcanswer->answer, true) . '</option>';
+ s($mcanswer->answer) . '</option>';
}
// In the next line, $readonly is invalid HTML, but it works in
// all browsers. $disabled would be valid, but then the JS for
/// Print input controls
if (isset($state->responses['']) && $state->responses['']!='') {
- $value = ' value="'.s($state->responses[''], true).'" ';
+ $value = ' value="'.s($state->responses['']).'" ';
} else {
$value = ' value="" ';
}
echo '<div class="correctness ' . $class . '">' . get_string($class, 'quiz');
if ($correctanswer && ($class == 'partiallycorrect' || $class == 'incorrect')) {
echo ('<div class="correctness">');
- print_string('correctansweris', 'quiz', s($correctanswer, true));
+ print_string('correctansweris', 'quiz', s($correctanswer));
echo ('</div>');
}
echo '</div>';