Make WordPress Core

Changeset 1411


Ignore:
Timestamp:
06/11/2004 06:23:12 PM (21 years ago)
Author:
jverber
Message:

Fixed invalid XHTML in a number of admin pages.

Location:
trunk/wp-admin
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/categories.php

    r1379 r1411  
    103103        <select name='cat' class='postform'>
    104104        <option value='0'<?php if (!$category->category_parent) echo " selected='selected'"; ?>><?php _e('None') ?></option>
    105         <?php wp_dropdown_cats($category->cat_ID, $category->category_parent); ?></p>
     105        <?php wp_dropdown_cats($category->cat_ID, $category->category_parent); ?>
    106106        </select>
    107107        </p>
     
    184184        <select name='cat' class='postform'>
    185185        <option value='0'><?php _e('None') ?></option>
    186         <?php wp_dropdown_cats(0); ?></p>
    187         </select>
     186        <?php wp_dropdown_cats(0); ?>
     187        </select></p>
    188188        <p><?php _e('Description: (optional)') ?> <br />
    189189        <textarea name="category_description" rows="5" cols="50" style="width: 97%;"></textarea></p>
  • trunk/wp-admin/edit-form.php

    r1245 r1411  
    9898      echo '<input name="advanced" type="submit" id="advancededit" tabindex="7" value="' .  __('Advanced Editing &raquo;') . '" />';
    9999  } ?>
    100   <input name="referredby" type="hidden" id="referredby" value="<?php if (isset($_SERVER['HTTP_REFERER'])) echo $_SERVER['HTTP_REFERER']; ?>" />
     100  <input name="referredby" type="hidden" id="referredby" value="<?php if (isset($_SERVER['HTTP_REFERER'])) echo urlencode($_SERVER['HTTP_REFERER']); ?>" />
    101101</p>
    102102
  • trunk/wp-admin/edit.php

    r1355 r1411  
    105105    <?php if ('private' == $post->post_status) _e(' - <strong>Private</strong>'); ?></td>
    106106    <td><?php the_category(','); ?></td>
    107     <td><a href="edit.php?p=<?php echo $id ?>&c=1">
     107    <td><a href="edit.php?p=<?php echo $id ?>&amp;c=1">
    108108      <?php comments_number(__('no comments'), __('1 comment'), __("% comments")) ?>
    109109      </a></td>
  • trunk/wp-admin/link-add.php

    r1355 r1411  
    8484         <tr>
    8585           <th width="33%" scope="row"><?php _e('URI:') ?></th>
    86            <td width="67%"><input type="text" name="linkurl" value="<?php echo $_GET['linkurl']; ?>" style="width: 95%; /"></td>
     86           <td width="67%"><input type="text" name="linkurl" value="<?php echo $_GET['linkurl']; ?>" style="width: 95%;" /></td>
    8787         </tr>
    8888         <tr>
     
    108108            <tr>
    109109                <th width="33%" scope="row"><?php _e('rel:') ?></th>
    110                 <td width="67%"><input type="text" name="rel" id="rel" size="50" value=""></td>
     110                <td width="67%"><input type="text" name="rel" id="rel" size="50" value="" /></td>
    111111            </tr>
    112112            <tr>
     
    116116                            <th scope="row"> <?php _e('friendship') ?> </th>
    117117                            <td><label for="label">
    118                                 <input class="valinp" type="radio" name="friendship" value="acquaintance" id="label"  />
     118                                <input class="valinp" type="radio" name="friendship" value="acquaintance" id="label" />
    119119                    <?php _e('acquaintance') ?></label>
    120120                                    <label for="label2">
     
    242242             <input type="radio" name="visible" checked="checked" value="Y" />
    243243<?php _e('Yes') ?></label><br />
    244 <label><input type="radio" name="visible" value="N"> <input type="hidden" name="action" value="Add" />
     244<label><input type="radio" name="visible" value="N" /> <input type="hidden" name="action" value="Add" />
    245245<?php _e('No') ?></label></td>
    246246         </tr>
     
    255255
    256256<div class="wrap">
    257 <?php printf(__('<p>You can drag <a href="%s" title="Link add bookmarklet">Link This</a> to your toolbar and when you click it a window will pop up that will allow you to add whatever site you&#8217;re on to your links! Right now this only works on Mozilla or Netscape, but we&#8217;re working on it.</p>'), "javascript:void(linkmanpopup=window.open('" . get_settings('siteurl') . "/wp-admin/link-add.php?action=popup&linkurl='+escape(location.href)+'&name='+escape(document.title),'LinkManager','scrollbars=yes,width=750,height=550,left=15,top=15,status=yes,resizable=yes'));linkmanpopup.focus();window.focus();linkmanpopup.focus();") ?>
     257<?php printf(__('<p>You can drag <a href="%s" title="Link add bookmarklet">Link This</a> to your toolbar and when you click it a window will pop up that will allow you to add whatever site you&#8217;re on to your links! Right now this only works on Mozilla or Netscape, but we&#8217;re working on it.</p>'), "javascript:void(linkmanpopup=window.open('" . get_settings('siteurl') . "/wp-admin/link-add.php?action=popup&amp;linkurl='+escape(location.href)+'&amp;name='+escape(document.title),'LinkManager','scrollbars=yes,width=750,height=550,left=15,top=15,status=yes,resizable=yes'));linkmanpopup.focus();window.focus();linkmanpopup.focus();") ?>
    258258</div>
    259259
  • trunk/wp-admin/link-categories.php

    r1355 r1411  
    157157    <td>
    158158    <select name="sort_order" size="1">
    159             <option value="name"    <?php echo ($row->sort_order == 'name') ? 'selected' : ''?>><?php _e('Name') ?></option>
     159            <option value="name" <?php echo ($row->sort_order == 'name') ? 'selected="selected"' : ''?>><?php _e('Name') ?></option>
    160160            <option value="id"      <?php echo ($row->sort_order == 'id') ? 'selected' : ''?>><?php _e('Id') ?></option>
    161161            <option value="url"     <?php echo ($row->sort_order == 'url') ? 'selected' : ''?>><?php _e('URL') ?></option>
     
    191191<tr>
    192192    <th width="33%" scope="row"><?php _e('Before Link:') ?></th>
    193     <td width="67%"><input type="text" name="text_before_link" size="45" value="<?php echo stripslashes($row->text_before_link)?>" /></td>
     193    <td width="67%"><input type="text" name="text_before_link" size="45" value="<?php echo htmlspecialchars(stripslashes($row->text_before_link))?>" /></td>
    194194</tr>
    195195<tr>
    196196<th scope="row"><?php _e('Between Link and Description:') ?></th>
    197 <td><input type="text" name="text_after_link" size="45" value="<?php echo stripslashes($row->text_after_link)?>" /></td>
     197<td><input type="text" name="text_after_link" size="45" value="<?php echo htmlspecialchars(stripslashes($row->text_after_link))?>" /></td>
    198198</tr>
    199199<tr>
    200200<th scope="row"><?php _e('After Link:') ?></th>
    201 <td><input type="text" name="text_after_all" size="45" value="<?php echo stripslashes($row->text_after_all)?>"/></td>
     201<td><input type="text" name="text_after_all" size="45" value="<?php echo htmlspecialchars(stripslashes($row->text_after_all))?>"/></td>
    202202</tr>
    203203</table>
  • trunk/wp-admin/link-import.php

    r1355 r1411  
    138138
    139139?>
     140</div>
    140141<?php
    141142                break;
     
    143144} // end switch
    144145?>
    145 </div>
    146146</body>
    147147</html>
  • trunk/wp-admin/link-manager.php

    r1355 r1411  
    344344         <tr>
    345345           <th width="33%" scope="row"><?php _e('URI:') ?></th>
    346            <td width="67%"><input type="text" name="linkurl" value="<?php echo $link_url; ?>" style="width: 95%; /"></td>
     346           <td width="67%"><input type="text" name="linkurl" value="<?php echo $link_url; ?>" style="width: 95%;" /></td>
    347347         </tr>
    348348         <tr>
     
    368368            <tr>
    369369                <th width="33%" scope="row"><?php _e('rel:') ?></th>
    370                 <td width="67%"><input type="text" name="rel" id="rel" size="50" value="<?php echo $link_rel; ?>"></td>
     370                <td width="67%"><input type="text" name="rel" id="rel" size="50" value="<?php echo $link_rel; ?>" /></td>
    371371            </tr>
    372372            <tr>
     
    656656</div>
    657657
     658<form name="links" id="links" method="post" action="">
    658659<div class="wrap">
    659660
    660     <form name="links" id="links" method="post" action="">
    661661    <input type="hidden" name="link_id" value="" />
    662662    <input type="hidden" name="action" value="" />
     
    727727            if ($show_buttons) {
    728728        echo '<td><a href="link-manager.php?link_id=' . $link->link_id . '&amp;action=linkedit" class="edit">' . __('Edit') . '</a></td>';
    729         echo '<td><a href="link-manager.php?link_id=' . $link->link_id . '&amp;action=Delete"' .  "onclick=\"return confirm('" . __("You are about to delete this link.\\n  \'Cancel\' to stop, \'OK\' to delete.") .  "');" . '" class="delete">' . __('Delete') . '</a></td>';
     729        echo '<td><a href="link-manager.php?link_id=' . $link->link_id . '&amp;action=Delete"' .  " onclick=\"return confirm('" . __("You are about to delete this link.\\n  \'Cancel\' to stop, \'OK\' to delete.") .  "');" . '" class="delete">' . __('Delete') . '</a></td>';
    730730        echo '<td><input type="checkbox" name="linkcheck[]" value="' . $link->link_id . '" /></td>';
    731731            } else {
     
    774774  } // end if !popup
    775775?>
     776</div>
    776777</form>
    777 </div>
    778778
    779779
  • trunk/wp-admin/optionhandler.php

    r1355 r1411  
    3030
    3131        case 2: // boolean
    32             $true_selected = ($option_result->option_value == '1') ? 'selected' : '';
    33             $false_selected = ($option_result->option_value == '0') ? 'selected' : '';
     32            $true_selected = ($option_result->option_value == '1') ? 'selected="selected"' : '';
     33            $false_selected = ($option_result->option_value == '0') ? 'selected="selected"' : '';
    3434            return <<<BOOLSELECT
    3535                    <label for="$option_result->option_name">$option_result->option_name</label>$between
     
    5656                    //error_log("comparing [$option_result->option_value] == [$option->optionvalue]");
    5757                    if ($option_result->option_value == $option->optionvalue) {
    58                         $ret .=' selected';
     58                        $ret .=' selected="selected"';
    5959                    }
    6060                    $ret .= ">$option->optionvalue_desc</option>\n";
     
    8686                    //error_log("comparing [$option_result->option_value] == [$option->optionvalue]");
    8787                    if ($option_result->option_value == $option->value) {
    88                         $ret .=' selected';
     88                        $ret .=' selected="selected"';
    8989                    }
    9090                    $ret .= ">$option->label</option>\n";
  • trunk/wp-admin/options-misc.php

    r1240 r1411  
    7171      <tr>
    7272        <th scope="row"><?php _e('Maximum size:') ?> </th>
    73         <td><input name="fileupload_maxk" type="text" id="fileupload_maxk" value="<?php echo get_settings('fileupload_maxk'); ?>" size="4">
     73        <td><input name="fileupload_maxk" type="text" id="fileupload_maxk" value="<?php echo get_settings('fileupload_maxk'); ?>" size="4" />
    7474        <?php _e('Kilobytes (KB)') ?></td>
    7575        </tr>
    7676      <tr>
    7777        <th valign="top" scope="row"><?php _e('Allowed file extensions:') ?></th>
    78         <td><input name="fileupload_allowedtypes" type="text" id="fileupload_allowedtypes" value="<?php echo get_settings('fileupload_allowedtypes'); ?>" size="40">
    79             <br>
     78        <td><input name="fileupload_allowedtypes" type="text" id="fileupload_allowedtypes" value="<?php echo get_settings('fileupload_allowedtypes'); ?>" size="40" />
     79            <br />
    8080         <?php _e('Recommended: <code>jpg jpeg png gif </code>') ?></td>
    8181        </tr>
  • trunk/wp-admin/options-permalink.php

    r1373 r1411  
    101101     </p>
    102102    <p class="submit">
    103       <input type="submit" name="submit" value="<?php _e('Update Permalink Structure &raquo;') ?>">
     103      <input type="submit" name="submit" value="<?php _e('Update Permalink Structure &raquo;') ?>" />
    104104    </p>
    105105  </form>
  • trunk/wp-admin/options-reading.php

    r1352 r1411  
    7575                <td><label>
    7676                    <input name="rss_use_excerpt"  type="radio" value="0" <?php checked(0, get_settings('rss_use_excerpt')); ?>  />
    77                     full text</label>                   <br>
     77                    full text</label>                   <br />
    7878                    <label>
    7979                    <input name="rss_use_excerpt" type="radio" value="1" <?php checked(1, get_settings('rss_use_excerpt')); ?> />
  • trunk/wp-admin/post.php

    r1405 r1411  
    748748<div class="wrap">
    749749<?php _e('<h3>WordPress bookmarklet</h3>
    750 <p>You can drag the following link to your links bar or add it to your bookmarks and when you "Press it" it will open up a popup window with information and a link to the site you&#8217re currently browsing so you can make a quick post about it. Try it out:</p>') ?>
     750<p>You can drag the following link to your links bar or add it to your bookmarks and when you "Press it" it will open up a popup window with information and a link to the site you&#8217;re currently browsing so you can make a quick post about it. Try it out:</p>') ?>
    751751<p>
    752752
     
    756756if ($is_NS4 || $is_gecko) {
    757757?>
    758 <a href="javascript:if(navigator.userAgent.indexOf('Safari') >= 0){Q=getSelection();}else{Q=document.selection?document.selection.createRange().text:document.getSelection();}void(window.open('<?php echo get_settings('siteurl') ?>/wp-admin/bookmarklet.php?text='+escape(Q)+'&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title),'<?php _e('WordPress bookmarklet') ?>','scrollbars=yes,width=600,height=460,left=100,top=150,status=yes'));"><?php printf(__('Press It - %s'), get_settings('blogname')); ?></a>
     758<a href="javascript:if(navigator.userAgent.indexOf('Safari') >= 0){Q=getSelection();}else{Q=document.selection?document.selection.createRange().text:document.getSelection();}void(window.open('<?php echo get_settings('siteurl') ?>/wp-admin/bookmarklet.php?text='+escape(Q)+'&amp;popupurl='+escape(location.href)+'&amp;popuptitle='+escape(document.title),'<?php _e('WordPress bookmarklet') ?>','scrollbars=yes,width=600,height=460,left=100,top=150,status=yes'));"><?php printf(__('Press It - %s'), get_settings('blogname')); ?></a>
    759759<?php
    760760} else if ($is_winIE) {
    761761?>
    762 <a href="javascript:Q='';if(top.frames.length==0)Q=document.selection.createRange().text;void(btw=window.open('<?php echo get_settings('siteurl') ?>/wp-admin/bookmarklet.php?text='+escape(Q)+'<?php echo $bookmarklet_tbpb ?>&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title),'bookmarklet','scrollbars=yes,width=600,height=<?php echo $bookmarklet_height ?>,left=100,top=150,status=yes'));btw.focus();"><?php printf(__('Press it - %s'), get_settings('blogname')); ?></a>
     762<a href="javascript:Q='';if(top.frames.length==0)Q=document.selection.createRange().text;void(btw=window.open('<?php echo get_settings('siteurl') ?>/wp-admin/bookmarklet.php?text='+escape(Q)+'<?php echo $bookmarklet_tbpb ?>&amp;popupurl='+escape(location.href)+'&amp;popuptitle='+escape(document.title),'bookmarklet','scrollbars=yes,width=600,height=<?php echo $bookmarklet_height ?>,left=100,top=150,status=yes'));btw.focus();"><?php printf(__('Press it - %s'), get_settings('blogname')); ?></a>
    763763<script type="text/javascript" language="JavaScript">
    764764<!--
  • trunk/wp-admin/profile.php

    r1380 r1411  
    304304        <option value="nickname"<?php
    305305    if ($profiledata->user_idmode == 'nickname')
    306     echo " selected"; ?>><?php echo $profiledata->user_nickname ?></option>
     306    echo ' selected="selected"'; ?>><?php echo $profiledata->user_nickname ?></option>
    307307        <option value="login"<?php
    308308    if ($profiledata->user_idmode=="login")
    309     echo " selected"; ?>><?php echo $profiledata->user_login ?></option>
     309    echo ' selected="selected"'; ?>><?php echo $profiledata->user_login ?></option>
    310310        <option value="firstname"<?php
    311311    if ($profiledata->user_idmode=="firstname")
    312     echo " selected"; ?>><?php echo $profiledata->user_firstname ?></option>
     312    echo ' selected="selected"'; ?>><?php echo $profiledata->user_firstname ?></option>
    313313        <option value="lastname"<?php
    314314    if ($profiledata->user_idmode=="lastname")
    315     echo " selected"; ?>><?php echo $profiledata->user_lastname ?></option>
     315    echo ' selected="selected"'; ?>><?php echo $profiledata->user_lastname ?></option>
    316316        <option value="namefl"<?php
    317317    if ($profiledata->user_idmode=="namefl")
    318     echo " selected"; ?>><?php echo $profiledata->user_firstname." ".$profiledata->user_lastname ?></option>
     318    echo ' selected="selected"'; ?>><?php echo $profiledata->user_firstname." ".$profiledata->user_lastname ?></option>
    319319        <option value="namelf"<?php
    320320    if ($profiledata->user_idmode=="namelf")
    321     echo " selected"; ?>><?php echo $profiledata->user_lastname." ".$profiledata->user_firstname ?></option>
     321    echo ' selected="selected"'; ?>><?php echo $profiledata->user_lastname." ".$profiledata->user_firstname ?></option>
    322322      </select>        </td>
    323323    </tr>
     
    325325      <th scope="row"><?php _e('New <strong>Password</strong> (Leave blank to stay the same.)') ?></th>
    326326      <td><input type="password" name="pass1" size="16" value="" />
    327         <br>
     327        <br />
    328328        <input type="password" name="pass2" size="16" value="" /></td>
    329329    </tr>
     
    332332    <input type="submit" value="<?php _e('Update Profile &raquo;') ?>" name="submit" />
    333333  </p>
    334     </div>
    335334</form>
    336335</div>
     336
     337
    337338<?php if ($is_gecko && $profiledata->user_level != 0) { ?>
    338339<div class="wrap">
    339340    <script language="JavaScript" type="text/javascript">
     341//<![CDATA[
    340342function addPanel()
    341343        {
     
    345347            alert(<?php __("'No Sidebar found!  You must use Mozilla 0.9.4 or later!'") ?>);
    346348        }
     349//]]>
    347350</script>
    348351    <strong><?php _e('SideBar') ?></strong><br />
     
    356359</div>
    357360<?php } ?>
     361</div>
    358362    <?php
    359363
  • trunk/wp-admin/users.php

    r1355 r1411  
    220220    <td align='center'>";
    221221    if (($user_level >= 2) and ($user_level > $user_data->user_level) and ($user_data->user_level > 0))
    222         echo " <a href=\"users.php?action=promote&id=".$user_data->ID."&prom=down\">-</a> ";
     222        echo " <a href=\"users.php?action=promote&amp;id=".$user_data->ID."&amp;prom=down\">-</a> ";
    223223    echo $user_data->user_level;
    224224    if (($user_level >= 2) and ($user_level > ($user_data->user_level + 1)))
    225         echo " <a href=\"users.php?action=promote&id=".$user_data->ID."&prom=up\">+</a> ";
    226     echo "<td align='right'>$numposts</td>";
     225        echo " <a href=\"users.php?action=promote&amp;id=".$user_data->ID."&amp;prom=up\">+</a> ";
     226    echo "</td><td align='right'>$numposts</td>";
    227227    echo '</tr>';
    228228    }
     
    262262echo "\n<tr $style>
    263263<td align='center'>$user_data->ID</td>
    264 <td><strong>$user_data->user_nickname</td>
     264<td><strong>$user_data->user_nickname</strong></td>
    265265<td>$user_data->user_firstname $user_data->user_lastname</td>
    266266<td><a href='mailto:$email' title='" . sprintf(__('e-mail: %s'), $email) . "'>$email</a></td>
     
    268268<td align='center'>";
    269269        if ($user_level >= 3)
    270             echo " <a href=\"users.php?action=delete&id=".$user_data->ID."\" style=\"color:red;font-weight:bold;\">X</a> ";
     270            echo " <a href=\"users.php?action=delete&amp;id=".$user_data->ID."\" style=\"color:red;font-weight:bold;\">X</a> ";
    271271        echo $user_data->user_level;
    272272        if ($user_level >= 2)
    273             echo " <a href=\"users.php?action=promote&id=".$user_data->ID."&prom=up\">+</a> "; 
     273            echo " <a href=\"users.php?action=promote&amp;id=".$user_data->ID."&amp;prom=up\">+</a> "; 
    274274        echo "</td>\n</tr>\n";
    275275    }
     
    317317  </table>
    318318  <p class="submit">
    319     <input name="adduser" type="submit" id="adduser" value="<?php _e('Add User') ?> &raquo;">
     319    <input name="adduser" type="submit" id="adduser" value="<?php _e('Add User') ?> &raquo;" />
    320320  </p>
    321321  </form>
Note: See TracChangeset for help on using the changeset viewer.