Skip to content
This repository
Browse code

Basic entities in the website title (#1359)

  • Loading branch information...
commit 883d26631b4c44080f98d171e4aefb6bae497a2c 1 parent 48890f8
Leo Feyer authored January 08, 2010

Showing 1 changed file with 16 additions and 3 deletions. Show diff stats Hide diff stats

  1. 19  system/drivers/DC_File.php
19  system/drivers/DC_File.php
@@ -226,7 +226,16 @@ public function edit()
226 226
 
227 227
 					$this->strField = $vv;
228 228
 					$this->strInputName = $vv;
229  
-					$this->varValue = htmlspecialchars($GLOBALS['TL_CONFIG'][$this->strField]);
  229
+
  230
+					// Handle entities
  231
+					if ($GLOBALS['TL_DCA'][$this->strTable]['fields'][$this->strField]['inputType'] == 'text' || $GLOBALS['TL_DCA'][$this->strTable]['fields'][$this->strField]['inputType'] == 'textarea')
  232
+					{
  233
+						$this->varValue = htmlspecialchars($GLOBALS['TL_CONFIG'][$this->strField]);
  234
+					}
  235
+					else
  236
+					{
  237
+						$this->varValue = $GLOBALS['TL_CONFIG'][$this->strField];
  238
+					}
230 239
 
231 240
 					// Call load_callback
232 241
 					if (is_array($GLOBALS['TL_DCA'][$this->strTable]['fields'][$this->strField]['load_callback']))
@@ -360,8 +369,12 @@ protected function save($varValue)
360 369
 			$varValue = $objDate->tstamp;
361 370
 		}
362 371
 
363  
-		$varValue = $this->restoreBasicEntities($varValue);
364  
-		$this->varValue = htmlspecialchars_decode($this->varValue);
  372
+		// Handle entities
  373
+		if ($arrData['inputType'] == 'text' || $arrData['inputType'] == 'textarea')
  374
+		{
  375
+			$varValue = $this->restoreBasicEntities($varValue);
  376
+			$this->varValue = htmlspecialchars_decode($this->varValue);
  377
+		}
365 378
 
366 379
 		// Call save_callback
367 380
 		if (is_array($arrData['save_callback']))

0 notes on commit 883d266

Please sign in to comment.
Something went wrong with that request. Please try again.