Permalink
Browse files

Basic entities in the website title (#1359)

  • Loading branch information...
1 parent 48890f8 commit 883d26631b4c44080f98d171e4aefb6bae497a2c @leofeyer leofeyer committed Jan 8, 2010
Showing with 16 additions and 3 deletions.
  1. +16 −3 system/drivers/DC_File.php
View
19 system/drivers/DC_File.php
@@ -226,7 +226,16 @@ public function edit()
$this->strField = $vv;
$this->strInputName = $vv;
- $this->varValue = htmlspecialchars($GLOBALS['TL_CONFIG'][$this->strField]);
+
+ // Handle entities
+ if ($GLOBALS['TL_DCA'][$this->strTable]['fields'][$this->strField]['inputType'] == 'text' || $GLOBALS['TL_DCA'][$this->strTable]['fields'][$this->strField]['inputType'] == 'textarea')
+ {
+ $this->varValue = htmlspecialchars($GLOBALS['TL_CONFIG'][$this->strField]);
+ }
+ else
+ {
+ $this->varValue = $GLOBALS['TL_CONFIG'][$this->strField];
+ }
// Call load_callback
if (is_array($GLOBALS['TL_DCA'][$this->strTable]['fields'][$this->strField]['load_callback']))
@@ -360,8 +369,12 @@ protected function save($varValue)
$varValue = $objDate->tstamp;
}
- $varValue = $this->restoreBasicEntities($varValue);
- $this->varValue = htmlspecialchars_decode($this->varValue);
+ // Handle entities
+ if ($arrData['inputType'] == 'text' || $arrData['inputType'] == 'textarea')
+ {
+ $varValue = $this->restoreBasicEntities($varValue);
+ $this->varValue = htmlspecialchars_decode($this->varValue);
+ }
// Call save_callback
if (is_array($arrData['save_callback']))

0 comments on commit 883d266

Please sign in to comment.