Ver Fonte

[svn r12103] prevent from having html codes in the fields title and description

Eric Marguin há 18 anos atrás
pai
commit
f62da614e3
1 ficheiros alterados com 6 adições e 7 exclusões
  1. 6 7
      main/newscorm/learnpath.class.php

+ 6 - 7
main/newscorm/learnpath.class.php

@@ -5685,8 +5685,8 @@ function display_thread_form($action = 'add', $id = 0, $extra_info = '')
 		
 		
 		$form = new FormValidator('form','POST',$_SERVER["PHP_SELF"]."?".$_SERVER["QUERY_STRING"]);
 		$form = new FormValidator('form','POST',$_SERVER["PHP_SELF"]."?".$_SERVER["QUERY_STRING"]);
 		
 		
-		$defaults["title"]=$item_title;
-		$defaults["description"]=$item_description;
+		$defaults["title"]=html_entity_decode($item_title);
+		$defaults["description"]=html_entity_decode($item_description);
 		
 		
 		$form->addElement('html',$return);
 		$form->addElement('html',$return);
 					
 					
@@ -5884,8 +5884,7 @@ function display_thread_form($action = 'add', $id = 0, $extra_info = '')
 		{
 		{
 			$item_title			= '';
 			$item_title			= '';
 			$item_description	= '';
 			$item_description	= '';
-		}
-		
+		}
 				
 				
 		$return = '<div style="margin:3px 10px;">';
 		$return = '<div style="margin:3px 10px;">';
 			
 			
@@ -5953,9 +5952,9 @@ function display_thread_form($action = 'add', $id = 0, $extra_info = '')
 			
 			
 			$form = new FormValidator('form','POST',$_SERVER["PHP_SELF"]."?".$_SERVER["QUERY_STRING"]);
 			$form = new FormValidator('form','POST',$_SERVER["PHP_SELF"]."?".$_SERVER["QUERY_STRING"]);
 			
 			
-			$defaults["title"]=$item_title;
-			$defaults["description"]=$item_description;
-			
+			$defaults["title"]=html_entity_decode($item_title);
+			$defaults["description"]=html_entity_decode($item_description);			
+		
 			$form->addElement('html',$return);
 			$form->addElement('html',$return);
 						
 						
 			//$arrHide = array($id);
 			//$arrHide = array($id);