edit-vacation.php

- fix double-encoded special characters if language file contains
  entity-encoded strings by html_entity_decode'ing the string
  (will be encoded in template file later)

edit-vacation.tpl:
- encode tSubject with htmlentities() in template


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@200 a1433add-5e2c-0410-b055-b7f2511e0802
postfixadmin-2.3
Christian Boltz 17 years ago
parent a00d456084
commit 32a1e93c9f

@ -76,8 +76,8 @@ if ($_SERVER['REQUEST_METHOD'] == "GET")
$tUseremail = $fUsername;
$tDomain = $fDomain;
if ($tSubject == '') { $tSubject = $PALANG['pUsersVacation_subject_text']; }
if ($tBody == '') { $tBody = $PALANG['pUsersVacation_body_text']; }
if ($tSubject == '') { $tSubject = html_entity_decode($PALANG['pUsersVacation_subject_text'], ENT_QUOTES, 'UTF-8'); }
if ($tBody == '') { $tBody = html_entity_decode($PALANG['pUsersVacation_body_text'], ENT_QUOTES, 'UTF-8'); }
}
@ -103,8 +103,8 @@ if ($_SERVER['REQUEST_METHOD'] == "POST")
}
$tUseremail = $fUsername;
if ($tSubject == '') { $tSubject = $PALANG['pUsersVacation_subject_text']; }
if ($tBody == '') { $tBody = $PALANG['pUsersVacation_body_text']; }
if ($tSubject == '') { $tSubject = html_entity_decode($PALANG['pUsersVacation_subject_text'], ENT_QUOTES, 'UTF-8'); }
if ($tBody == '') { $tBody = html_entity_decode($PALANG['pUsersVacation_body_text'], ENT_QUOTES, 'UTF-8'); }
//if change, remove old one, then perhaps set new one
if (!empty ($fBack) || !empty ($fChange))

@ -19,7 +19,7 @@ window.location="<?php print $fCanceltarget; ?>"
</tr>
<tr>
<td><?php print $PALANG['pUsersVacation_subject'] . ":"; ?></td>
<td><textarea class="flat" cols="60" name="fSubject" ><?php print $tSubject; ?></textarea></td>
<td><textarea class="flat" cols="60" name="fSubject" ><?php print htmlentities($tSubject, ENT_QUOTES, 'UTF-8'); ?></textarea></td>
<td>&nbsp;</td>
</tr>
<tr>

Loading…
Cancel
Save