}
//
});
- var start, context, end, arrival, currentDate, currentDate2, requiredDate, requiredDate1, minDays, departure, stay, d, dd, m, y, bayView = 'vD4ZpIFk4%2b7FyPsaBnkCqP1cBHWnJili9k5D83MqJq4%3d&',
+ var start, context, context2, end, arrival, currentDate, currentDate2, requiredDate, requiredDate1, minDays, departure, stay, d, dd, m, y, bayView = 'vD4ZpIFk4%2b7FyPsaBnkCqP1cBHWnJili9k5D83MqJq4%3d&',
crookedRiver = 'ZhWXD46i2%2fq319vcR%2fcw69rZvA2bz%2fttOOxO9t1%2fBJ0%3d&',
adults,
kids,
$('.searchform').css("right", "5px");
$("li a.search").css("visibility", "visible");
});
- $('.search-result-container p.search_result_context').find('br').remove().text();
-
-
-
-
-
-
+ $('.search-result-container p.search_result_context:contains("<br>")').remove();
+ $('.search-result-container p.search_result_context').text(function () {
+ return $(this).text().replace(/(<([^>]+)>)/ig, "");
+ });
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
});
}
//
});
- var start, context, end, arrival, currentDate, currentDate2, requiredDate, requiredDate1, minDays, departure, stay, d, dd, m, y, bayView = 'vD4ZpIFk4%2b7FyPsaBnkCqP1cBHWnJili9k5D83MqJq4%3d&',
+ var start, context, context2, end, arrival, currentDate, currentDate2, requiredDate, requiredDate1, minDays, departure, stay, d, dd, m, y, bayView = 'vD4ZpIFk4%2b7FyPsaBnkCqP1cBHWnJili9k5D83MqJq4%3d&',
crookedRiver = 'ZhWXD46i2%2fq319vcR%2fcw69rZvA2bz%2fttOOxO9t1%2fBJ0%3d&',
adults,
kids,
$('.searchform').css("right", "5px");
$("li a.search").css("visibility", "visible");
});
- $('.search-result-container p.search_result_context').find('br').remove().text();
-
-
-
-
-
-
+ $('.search-result-container p.search_result_context:contains("<br>")').remove();
+ $('.search-result-container p.search_result_context').text(function () {
+ return $(this).text().replace(/(<([^>]+)>)/ig, "");
+ });
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
});
// Load content as plain text
global $wp_query, $post;
-
+
$content = (!post_password_required($post) ? strip_tags(preg_replace(array("/\r?\n/", '@<\s*(p|br\s*/?)\s*>@'), array(' ', "\n"), apply_filters('the_content', $post->post_content))) : '');
-
+
// Search content for terms
$terms = $wp_query->query_vars['search_terms'];
if ( preg_match_all('/'.str_replace('/', '\/', join('|', $terms)).'/i', $content, $matches, PREG_OFFSET_CAPTURE) ) {
// Highlight matches
$context = nl2br(preg_replace('/'.str_replace('/', '\/', join('|', $terms)).'/i', '<strong>$0</strong>', $output));
-
+
?>
<p class="search_result_context">