X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Faddressbook.php;h=68d852447563e71807af773edc16b78564e66bec;hb=3523532820419e678843408d5a31db951636fa55;hp=f60066eea0742e7403c858246072a1e11fd0946d;hpb=2c34672a65cebca402a4ef61bedbd9447fd38d24;p=squirrelmail.git diff --git a/src/addressbook.php b/src/addressbook.php index f60066ee..68d85244 100644 --- a/src/addressbook.php +++ b/src/addressbook.php @@ -215,7 +215,7 @@ if (!empty($formerror)) { html_tag( 'tr', html_tag( 'td', "\n". '
' . _("ERROR") . ': ' . $formerror . '' ."\n", + '">' . _("ERROR") . ': ' . nl2br(htmlspecialchars($formerror)) . '' ."\n", 'center' ) ), 'center', '', 'width="100%"' ); @@ -227,7 +227,7 @@ if ($showaddrlist) { /* Get and sort address list */ $alist = $abook->list_addr(); if(!is_array($alist)) { - plain_error_message($abook->error, $color); + plain_error_message(nl2br(htmlspecialchars($abook->error)), $color); exit; } @@ -325,20 +325,9 @@ if ($showaddrlist) { ' ' . htmlspecialchars($row['nickname']) . ' ', 'left', '', 'valign="top" width="1%" style="white-space: nowrap;"' ); - // different full name display formating for Japanese translation - if ($squirrelmail_language == 'ja_JP') { - /* - * translation uses euc-jp character set internally. - * htmlspecialchars() should not break any characters. - */ - echo html_tag( 'td', - ' ' . htmlspecialchars($row['lastname']) . ' ' . htmlspecialchars($row['firstname']) . ' ', - 'left', '', 'valign="top" width="1%" style="white-space: nowrap;"' ); - } else { - echo html_tag( 'td', - ' ' . htmlspecialchars($row['name']) . ' ', - 'left', '', 'valign="top" width="1%" style="white-space: nowrap;"' ); - } + echo html_tag( 'td', + ' ' . htmlspecialchars($row['name']) . ' ', + 'left', '', 'valign="top" width="1%" style="white-space: nowrap;"' ); // email address column echo html_tag( 'td', '', 'left', '', 'valign="top" width="1%" style="white-space: nowrap;"' ) . ' ';