fix to distinguish between entities (eg. ü) and accesskeys lik &Delete

This commit is contained in:
Ralf Becker 2002-10-18 21:33:39 +00:00
parent 6e17b96dd9
commit 95f9ac8504
2 changed files with 4 additions and 2 deletions

View File

@ -127,7 +127,8 @@ class html
{
$lang = lang($lang);
}
if (($accesskey = strstr($lang,'&')) && $accesskey[1] != ' ')
if (($accesskey = strstr($lang,'&')) && $accesskey[1] != ' ' &&
(($pos = strpos($accesskey,';')) === False || $pos > 5))
{
$lang_u = str_replace('&'.$accesskey[1],'<u>'.$accesskey[1].'</u>',$lang);
$lang = str_replace('&','',$lang);

View File

@ -768,7 +768,8 @@
{
$label = lang($label);
}
if (($accesskey = strstr($label,'&')) && $accesskey[1] != ' ' && $form_name != '')
if (($accesskey = strstr($label,'&')) && $accesskey[1] != ' ' && $form_name != '' &&
(($pos = strpos($accesskey,';')) === False || $pos > 5))
{
$label = str_replace('&'.$accesskey[1],'<u>'.$accesskey[1].'</u>',$label);
$label = $this->html->label($label,$form_name,$accesskey[1]);