function wp_logout_url($redirect = '') {
$args = array( 'action' => 'logout' );
if ( !empty($redirect) ) {
- $args['redirect_to'] = $redirect;
+ $args['redirect_to'] = urlencode( $redirect );
}
$logout_url = add_query_arg($args, site_url('wp-login.php', 'login'));
$afterafter = $after;
foreach ( (array) $arcresults as $arcresult ) {
$url = get_month_link( $arcresult->year, $arcresult->month );
+ /* translators: 1: month name, 2: 4-digit year */
$text = sprintf(__('%1$s %2$d'), $wp_locale->get_month($arcresult->month), $arcresult->year);
if ( $show_post_count )
$after = ' ('.$arcresult->posts.')' . $afterafter;
/* translators: Calendar caption: 1: month name, 2: 4-digit year */
$calendar_caption = _x('%1$s %2$s', 'calendar caption');
- echo '<table id="wp-calendar" summary="' . __('Calendar') . '">
+ echo '<table id="wp-calendar" summary="' . esc_attr__('Calendar') . '">
<caption>' . sprintf($calendar_caption, $wp_locale->get_month($thismonth), date('Y', $unixmonth)) . '</caption>
<thead>
<tr>';
foreach ( $myweek as $wd ) {
$day_name = (true == $initial) ? $wp_locale->get_weekday_initial($wd) : $wp_locale->get_weekday_abbrev($wd);
+ $wd = esc_attr($wd);
echo "\n\t\t<th abbr=\"$wd\" scope=\"col\" title=\"$wd\">$day_name</th>";
}
if ( $next ) {
echo "\n\t\t".'<td abbr="' . $wp_locale->get_month($next->month) . '" colspan="3" id="next"><a href="' .
- get_month_link($next->year, $next->month) . '" title="' . sprintf(__('View posts for %1$s %2$s'), $wp_locale->get_month($next->month),
- date('Y', mktime(0, 0 , 0, $next->month, 1, $next->year))) . '">' . $wp_locale->get_month_abbrev($wp_locale->get_month($next->month)) . ' »</a></td>';
+ get_month_link($next->year, $next->month) . '" title="' . esc_attr( sprintf(__('View posts for %1$s %2$s'), $wp_locale->get_month($next->month) ,
+ date('Y', mktime(0, 0 , 0, $next->month, 1, $next->year))) ) . '">' . $wp_locale->get_month_abbrev($wp_locale->get_month($next->month)) . ' »</a></td>';
} else {
echo "\n\t\t".'<td colspan="3" id="next" class="pad"> </td>';
}
// See how much we should pad in the beginning
$pad = calendar_week_mod(date('w', $unixmonth)-$week_begins);
if ( 0 != $pad )
- echo "\n\t\t".'<td colspan="'.$pad.'" class="pad"> </td>';
+ echo "\n\t\t".'<td colspan="'. esc_attr($pad) .'" class="pad"> </td>';
$daysinmonth = intval(date('t', $unixmonth));
for ( $day = 1; $day <= $daysinmonth; ++$day ) {
echo '<td>';
if ( in_array($day, $daywithpost) ) // any posts today?
- echo '<a href="' . get_day_link($thisyear, $thismonth, $day) . "\" title=\"$ak_titles_for_day[$day]\">$day</a>";
+ echo '<a href="' . get_day_link($thisyear, $thismonth, $day) . "\" title=\"" . esc_attr($ak_titles_for_day[$day]) . "\">$day</a>";
else
echo $day;
echo '</td>';
$pad = 7 - calendar_week_mod(date('w', mktime(0, 0 , 0, $thismonth, $day, $thisyear))-$week_begins);
if ( $pad != 0 && $pad != 7 )
- echo "\n\t\t".'<td class="pad" colspan="'.$pad.'"> </td>';
+ echo "\n\t\t".'<td class="pad" colspan="'. esc_attr($pad) .'"> </td>';
echo "\n\t</tr>\n\t</tbody>\n\t</table>";
add_action( 'delete_post', 'delete_get_calendar_cache' );
add_action( 'update_option_start_of_week', 'delete_get_calendar_cache' );
add_action( 'update_option_gmt_offset', 'delete_get_calendar_cache' );
-add_action( 'update_option_start_of_week', 'delete_get_calendar_cache' );
/**
* Display all of the allowed tags in HTML format with attributes.
* @return string
*/
function get_search_query() {
- return apply_filters( 'get_search_query', stripslashes( get_query_var( 's' ) ) );
+ return apply_filters( 'get_search_query', get_query_var( 's' ) );
}
/**
return apply_filters( "get_the_generator_{$type}", $gen, $type );
}
-?>
+?>
\ No newline at end of file