From 90e36267cf56cdaf8bbe84aa0c2fec8949429f99 Mon Sep 17 00:00:00 2001 From: mjhead Date: Mon, 21 Aug 2017 15:39:45 +0300 Subject: [PATCH] FIX: documentation search --- includes/handlers/class-wapu-core-docs-search.php | 5 ++--- wapu-core.php | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/includes/handlers/class-wapu-core-docs-search.php b/includes/handlers/class-wapu-core-docs-search.php index d2f8c19..86ebd8a 100644 --- a/includes/handlers/class-wapu-core-docs-search.php +++ b/includes/handlers/class-wapu-core-docs-search.php @@ -68,7 +68,7 @@ public function __construct( $args = array() ) { $this->args = wp_parse_args( $args, $this->args ); $this->sanitize_cb = array( - 'http:\/\/documentation\.[a-z]*\.com\/[a-zA-Z-_]*\/index\.php\?project=' => array( $this, 'sanitize_old_wp' ), + 'http:\/\/documentation\.[a-z]*\.com\/[a-zA-Z-_\/]*index\.php\?project=' => array( $this, 'sanitize_old_wp' ), ); } @@ -81,14 +81,13 @@ public function __construct( $args = array() ) { public function run( $query ) { $query = trim( $query ); + $query = $this->sanitize_query( $query ); $stored = $this->try_get_stored_result( $query ); if ( ! empty( $stored ) ) { return $stored; } - $query = $this->sanitize_query( $query ); - if ( 0 < intval( $query ) ) { $result = $this->search_by_template_id( $query ); } else { diff --git a/wapu-core.php b/wapu-core.php index f92f591..c56ded4 100644 --- a/wapu-core.php +++ b/wapu-core.php @@ -3,7 +3,7 @@ * Plugin Name: Wapuu Core * Plugin URI: http://www.cherryframework.com/plugins/ * Description: Core for jetimpex.com. - * Version: 1.1.0 + * Version: 1.1.1 * Author: JetImpex * Author URI: http://cherryframework.com/ * Text Domain: wapu-core @@ -63,7 +63,7 @@ class Wapu_Core { * * @var string */ - private $version = '1.1.0'; + private $version = '1.1.1'; /** * Core page trigger