Changeset 763 for trunk/lib/HTML.inc.php


Ignore:
Timestamp:
Feb 24, 2022 10:05:48 PM (2 years ago)
Author:
anonymous
Message:

Include boomerang in hidden input on login form so the user will be redirected if the revisit the login form after session is garbage collected. Add escape values used in html attributes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/HTML.inc.php

    r713 r763  
    7878                echo '<li><a';
    7979                foreach (array_diff_key($b, array('value' => null)) as $key => $value) {
    80                     printf(' %s="%s"', $key, oTxt($value));
     80                    printf(' %s="%s"', oTxt($key), oTxt($value));
    8181                }
    8282                echo '>' . oTxt($b['value']) . '</a></li>';
     
    8888                echo '<li><input';
    8989                foreach ($b as $key => $value) {
    90                     printf(' %s="%s"', $key, oTxt($value));
     90                    printf(' %s="%s"', oTxt($key), oTxt($value));
    9191                }
    9292                echo ' /></li>';
     
    247247            printf('<option value="%s"%s%s%s>%s</option>',
    248248                oTxt($o['value']),
    249                 (isset($o['class']) && sprintf(' class="%s"', $o['class']) ? : ''),
    250                 (isset($o['selected']) && $o['selected'] ? ' selected="selected"' : ''),
    251                 (isset($o['disabled']) && $o['disabled'] ? ' disabled="disabled"' : ''),
     249                (isset($o['class']) && sprintf(' class="%s"', oTxt($o['class'])) ? : ''),
     250                (isset($o['selected']) && oTxt($o['selected']) ? ' selected="selected"' : ''),
     251                (isset($o['disabled']) && oTxt($o['disabled']) ? ' disabled="disabled"' : ''),
    252252                oTxt($o['text'])
    253253            );
     
    280280        foreach ($options as $value => $text) {
    281281            printf('<option value="%s"%s>%s</option>',
    282                 $value,
     282                oTxt($value),
    283283                $preselected == $value ? ' selected="selected"' : '',
    284                 $text
     284                oTxt($text)
    285285            );
    286286        }
Note: See TracChangeset for help on using the changeset viewer.