[svn r20717] FS#306 - Replacing some natural language unsafe occurrences of the function html_entity_decode().

skala
Ivan Tcholakov 17 years ago
parent 2b68b8876e
commit ecbfd35e89
  1. 4
      main/forum/forumfunction.inc.php
  2. 6
      main/gradebook/gradebook_result.class.php
  3. 2
      main/newscorm/openoffice_presentation.class.php
  4. 4
      main/social/index.php
  5. 4
      main/survey/survey.lib.php

@ -3162,7 +3162,7 @@ function prepare4display($input='') {
}
$counter = 0;
foreach ($search_terms as $key=>$search_term) {
$input = str_replace(trim(api_html_entity_decode($search_term)),'<span style="background-color: '.$highlightcolors[$counter].'">'.trim(html_entity_decode($search_term)).'</span>',$input);
$input = str_replace(trim(api_html_entity_decode($search_term)),'<span style="background-color: '.$highlightcolors[$counter].'">'.trim(api_html_entity_decode($search_term)).'</span>',$input);
$counter++;
}
}
@ -3172,7 +3172,7 @@ function prepare4display($input='') {
{
$returnarray[$key]=stripslashes($value);
}*/
$returnarray=array_walk($input, 'html_entity_decode');
$returnarray=array_walk($input, 'api_html_entity_decode');
$returnarray=array_walk($input, 'stripslashes');
return $returnarray;
}

@ -212,7 +212,7 @@ class GradeBookResult
foreach ($dato[0] as $header_col) {
if(!empty($header_col)) {
$data .= str_replace("\r\n",' ',html_entity_decode(strip_tags($header_col))).';';
$data .= str_replace("\r\n",' ',api_html_entity_decode(strip_tags($header_col))).';';
}
}
@ -223,7 +223,7 @@ class GradeBookResult
for($i=0;$i<$cant_students;$i++) {
$column = 0;
foreach($dato[1][$i] as $col_name) {
$data .= str_replace("\r\n",' ',html_entity_decode(strip_tags($col_name))).';';
$data .= str_replace("\r\n",' ',api_html_entity_decode(strip_tags($col_name))).';';
}
$data .="\r\n";
}
@ -288,4 +288,4 @@ class GradeBookResult
}
endif;
?>
?>

@ -50,7 +50,7 @@ class OpenofficePresentation extends OpenofficeDocument {
$slide_name = api_htmlentities($slide_name,ENT_COMPAT,$this->original_charset);
$slide_name = str_replace('&rsquo;','\'',$slide_name);
$slide_name = api_convert_encoding($slide_name, api_get_setting('platform_charset'), $this->original_charset);
$slide_name = html_entity_decode($slide_name, ENT_COMPAT, api_get_setting('platform_charset'));
$slide_name = api_html_entity_decode($slide_name, ENT_COMPAT, api_get_setting('platform_charset'));
if($this->take_slide_name === true)
{

@ -466,7 +466,7 @@ Display :: display_header('');
if (isset($_GET['sendform'])) {
$form_reply=array();
$form_reply[]=urlencode($_POST['title']);
$form_reply[]=urlencode(html_entity_decode($_POST['content']));
$form_reply[]=urlencode(api_html_entity_decode($_POST['content']));
$form_reply[]=$_POST['user_list'];
$form_reply[]=$_POST['re_id'];
$form_reply[]=urlencode($_POST['compose']);
@ -515,4 +515,4 @@ $form_url_send=isset($form_send_data_message) ? $form_send_data_message :'';
</div>
<?php
Display :: display_footer();
?>
?>

@ -24,7 +24,7 @@
* @package dokeos.survey
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University: cleanup, refactoring and rewriting large parts (if not all) of the code
@author Julio Montoya Armas <gugli100@gmail.com>, Dokeos: Personality Test modification and rewriting large parts of the code
* @version $Id: survey.lib.php 20610 2009-05-13 21:53:48Z cvargas1 $
* @version $Id: survey.lib.php 20717 2009-05-16 10:32:10Z ivantcholakov $
*
* @todo move this file to inc/lib
* @todo use consistent naming for the functions (save vs store for instance)
@ -1848,7 +1848,7 @@ class personality extends question
$this->html .= ' <tr>';
$this->html .= ' <td align="right"><label for="answers['.$key.']">'.($key+1).'</label></td>';
//$this->html .= ' <td><input type="text" name="answers['.$key.']" id="answers['.$key.']" value="'.$form_content['answers'][$key].'" /></td>';
$this->html .= ' <td width="550">'.api_return_html_area('answers['.$key.']', html_entity_decode(stripslashes($form_content['answers'][$key]))).'</td>';
$this->html .= ' <td width="550">'.api_return_html_area('answers['.$key.']', api_html_entity_decode(stripslashes($form_content['answers'][$key]))).'</td>';
$this->html .= ' <td>';
if ($total_number_of_answers> 2)

Loading…
Cancel
Save