SF.net SVN: postfixadmin: [209] trunk
Brought to you by:
christian_boltz,
gingerdog
From: <chr...@us...> - 2007-11-11 23:08:53
|
Revision: 209 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=209&view=rev Author: christian_boltz Date: 2007-11-11 15:08:58 -0800 (Sun, 11 Nov 2007) Log Message: ----------- (basically the same as in r200, this time for users/vacation.php) users/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) users_vacation.tpl: - encode tSubject with htmlentities() in template Modified Paths: -------------- trunk/templates/users_vacation.tpl trunk/users/vacation.php Property Changed: ---------------- trunk/templates/users_vacation.tpl trunk/users/vacation.php Modified: trunk/templates/users_vacation.tpl =================================================================== --- trunk/templates/users_vacation.tpl 2007-11-11 22:48:07 UTC (rev 208) +++ trunk/templates/users_vacation.tpl 2007-11-11 23:08:58 UTC (rev 209) @@ -6,7 +6,7 @@ </tr> <tr> <td><?php print $PALANG['pUsersVacation_subject'] . ":"; ?></td> - <td><input type="text" name="fSubject" value="<?php print $tSubject; ?>" /></td> + <td><input type="text" name="fSubject" value="<?php print htmlentities($tSubject, ENT_QUOTES, 'UTF-8'); ?>" /></td> <td> </td> </tr> <tr> @@ -31,3 +31,4 @@ </table> </form> </div> +<?php /* vim: set ft=php expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ ?> Property changes on: trunk/templates/users_vacation.tpl ___________________________________________________________________ Name: svn:keywords + Id Rev Modified: trunk/users/vacation.php =================================================================== --- trunk/users/vacation.php 2007-11-11 22:48:07 UTC (rev 208) +++ trunk/users/vacation.php 2007-11-11 23:08:58 UTC (rev 209) @@ -42,7 +42,7 @@ exit(0); } -$tmp = preg_split ('/@/', $USERID_USERNAME); +$tmp = preg_split ('/@/', $USERID_USERNAME); $USERID_DOMAIN = $tmp[1]; if ($_SERVER['REQUEST_METHOD'] == "GET") @@ -56,10 +56,10 @@ $tBody = $row['body']; } - 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'); } - $template = "users_vacation.tpl"; + $template = "users_vacation.tpl"; include ("../templates/header.tpl"); include ("../templates/users_menu.tpl"); @@ -85,8 +85,8 @@ if (isset ($_POST['fBack'])) $fBack = escape_string ($_POST['fBack']); //set a default, reset fields for coming back selection - 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 they've set themselves away OR back, delete any record of vacation emails. if (!empty ($fBack) || !empty ($fAway)) @@ -184,4 +184,6 @@ include ("../templates/users_vacation.tpl"); include ("../templates/footer.tpl"); } + +/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */ ?> Property changes on: trunk/users/vacation.php ___________________________________________________________________ Name: svn:keywords + Id Rev This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |