Updated all instances of home_url() with esc_url()
This commit is contained in:
@@ -227,7 +227,7 @@ function roots_nice_search_redirect() {
|
||||
|
||||
$search_base = $wp_rewrite->search_base;
|
||||
if (is_search() && !is_admin() && strpos($_SERVER['REQUEST_URI'], "/{$search_base}/") === false) {
|
||||
wp_redirect(home_url("/{$search_base}/" . urlencode(get_query_var('s'))));
|
||||
wp_redirect(esc_url(home_url("/{$search_base}/" . urlencode(get_query_var('s')))));
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ class Roots_Vcard_Widget extends WP_Widget {
|
||||
}
|
||||
?>
|
||||
<p class="vcard">
|
||||
<a class="fn org url" href="<?php echo home_url('/'); ?>"><?php bloginfo('name'); ?></a><br>
|
||||
<a class="fn org url" href="<?php echo esc_url(home_url('/')); ?>"><?php bloginfo('name'); ?></a><br>
|
||||
<span class="adr">
|
||||
<span class="street-address"><?php echo $instance['street_address']; ?></span><br>
|
||||
<span class="locality"><?php echo $instance['locality']; ?></span>,
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="<?php echo home_url(); ?>/"><?php bloginfo('name'); ?></a>
|
||||
<a class="navbar-brand" href="<?php echo esc_url(home_url('/')); ?>/"><?php bloginfo('name'); ?></a>
|
||||
</div>
|
||||
|
||||
<nav class="collapse navbar-collapse" role="navigation">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<form role="search" method="get" class="search-form form-inline" action="<?php echo home_url('/'); ?>">
|
||||
<form role="search" method="get" class="search-form form-inline" action="<?php echo esc_url(home_url('/')); ?>">
|
||||
<div class="input-group">
|
||||
<input type="search" value="<?php if (is_search()) { echo get_search_query(); } ?>" name="s" class="search-field form-control" placeholder="<?php _e('Search', 'roots'); ?> <?php bloginfo('name'); ?>">
|
||||
<input type="search" value="<?php if (is_search()) echo esc_url(home_url('/')); ?>" name="s" class="search-field form-control" placeholder="<?php _e('Search', 'roots'); ?> <?php bloginfo('name'); ?>">
|
||||
<label class="hide"><?php _e('Search for:', 'roots'); ?></label>
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" class="search-submit btn btn-default"><?php _e('Search', 'roots'); ?></button>
|
||||
|
||||
Reference in New Issue
Block a user