Make WordPress Core


Ignore:
Timestamp:
12/12/2004 08:41:19 PM (22 years ago)
Author:
saxmatt
Message:

Axing htmlspecialchars because it double-encodes-encodes. Better error handling around queries.

File:
1 edited

Legend:

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

    r1889 r1940  
    55$parent_file = 'edit.php';
    66require_once('admin-header.php');
     7
     8$_GET['m'] = (int) $_GET['m'];
    79
    810get_currentuserinfo();
     
    6668    echo $month[substr( $_GET['m'], 4, 2 )] . ' ' . substr( $_GET['m'], 0, 4 );
    6769} elseif ( isset( $_GET['s'] ) ) {
    68     printf(__('Search for “%s”'), htmlspecialchars($_GET['s']) );
     70    printf(__('Search for “%s”'), wp_specialchars($_GET['s']) );
    6971} else {
    7072    _e('Last 15 Posts');
     
    9193            $arc_month = $arc_row->mmonth;
    9294           
    93             if( isset($_GET['m']) && $arc_year . zeroise($arc_month, 2) == $_GET['m'] )
     95            if( isset($_GET['m']) && $arc_year . zeroise($arc_month, 2) == (int) $_GET['m'] )
    9496                $default = 'selected="selected"';
    9597            else
     
    122124<?php
    123125$what_to_show = 'posts';
    124 if ( empty($_GET['m']) && empty($_GET['s']) ) {
     126if ( empty($_GET['m']) || 0 == $_GET['m'] && empty($_GET['s']) ) {
    125127  $showposts = 15;
    126128} else {
Note: See TracChangeset for help on using the changeset viewer.