Version Description
[Mar 24, 2022] = * Fixed: Trailing slashes were automatically added to Source URL when creating a new Redirection rule
Download this release
Release Info
Developer | rankmath |
Plugin | WordPress SEO Plugin – Rank Math |
Version | 1.0.85.1 |
Comparing to | |
See all releases |
Code changes from version 1.0.85 to 1.0.85.1
- includes/modules/redirections/class-redirection.php +21 -12
- rank-math.php +2 -2
- readme.txt +4 -1
- vendor/composer/installed.php +6 -6
includes/modules/redirections/class-redirection.php
CHANGED
@@ -262,16 +262,19 @@ class Redirection {
|
|
262 |
* @return string
|
263 |
*/
|
264 |
private function sanitize_source( $pattern, $comparison ) {
|
265 |
-
if ( '
|
266 |
-
|
267 |
-
|
|
|
|
|
268 |
|
269 |
-
|
270 |
-
|
271 |
-
$this->
|
272 |
}
|
273 |
|
274 |
-
|
|
|
275 |
}
|
276 |
|
277 |
/**
|
@@ -314,11 +317,12 @@ class Redirection {
|
|
314 |
return ltrim( $url, '/' );
|
315 |
}
|
316 |
|
317 |
-
$
|
318 |
-
$
|
319 |
-
$url
|
320 |
-
$
|
321 |
-
$
|
|
|
322 |
'http://' . $domain,
|
323 |
'http://www.' . $domain,
|
324 |
'https://' . $domain,
|
@@ -334,6 +338,11 @@ class Redirection {
|
|
334 |
return false;
|
335 |
}
|
336 |
|
|
|
|
|
|
|
|
|
|
|
337 |
return urldecode( self::strip_subdirectory( $url ) );
|
338 |
}
|
339 |
|
262 |
* @return string
|
263 |
*/
|
264 |
private function sanitize_source( $pattern, $comparison ) {
|
265 |
+
if ( 'exact' === $comparison ) {
|
266 |
+
$pattern = $this->sanitize_source_url( $pattern );
|
267 |
+
if ( $pattern && false === $this->nocache ) {
|
268 |
+
$this->pre_redirection_cache( $pattern );
|
269 |
+
}
|
270 |
|
271 |
+
return $pattern;
|
272 |
+
} elseif ( 'regex' === $comparison ) {
|
273 |
+
return $this->sanitize_source_regex( $pattern );
|
274 |
}
|
275 |
|
276 |
+
// Other comparison types: "contains", "start", "end".
|
277 |
+
return filter_var( $pattern, FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_BACKTICK );
|
278 |
}
|
279 |
|
280 |
/**
|
317 |
return ltrim( $url, '/' );
|
318 |
}
|
319 |
|
320 |
+
$original = $url;
|
321 |
+
$domain = $this->get_home_domain();
|
322 |
+
$url = trailingslashit( $url );
|
323 |
+
$url = str_replace( $domain . '#', $domain . '/#', $url ); // For website.com#URI link.
|
324 |
+
$domain = trailingslashit( $domain );
|
325 |
+
$search = [
|
326 |
'http://' . $domain,
|
327 |
'http://www.' . $domain,
|
328 |
'https://' . $domain,
|
338 |
return false;
|
339 |
}
|
340 |
|
341 |
+
// Remove trailing slash if original url doesn't have it.
|
342 |
+
if ( '/' !== substr( $original, -1 ) ) {
|
343 |
+
$url = untrailingslashit( $url );
|
344 |
+
}
|
345 |
+
|
346 |
return urldecode( self::strip_subdirectory( $url ) );
|
347 |
}
|
348 |
|
rank-math.php
CHANGED
@@ -9,7 +9,7 @@
|
|
9 |
*
|
10 |
* @wordpress-plugin
|
11 |
* Plugin Name: Rank Math SEO
|
12 |
-
* Version: 1.0.85
|
13 |
* Plugin URI: https://s.rankmath.com/home
|
14 |
* Description: Rank Math is a revolutionary SEO product that combines the features of many SEO tools and lets you multiply your traffic in the easiest way possible.
|
15 |
* Author: Rank Math
|
@@ -34,7 +34,7 @@ final class RankMath {
|
|
34 |
*
|
35 |
* @var string
|
36 |
*/
|
37 |
-
public $version = '1.0.85';
|
38 |
|
39 |
/**
|
40 |
* Rank Math database version.
|
9 |
*
|
10 |
* @wordpress-plugin
|
11 |
* Plugin Name: Rank Math SEO
|
12 |
+
* Version: 1.0.85.1
|
13 |
* Plugin URI: https://s.rankmath.com/home
|
14 |
* Description: Rank Math is a revolutionary SEO product that combines the features of many SEO tools and lets you multiply your traffic in the easiest way possible.
|
15 |
* Author: Rank Math
|
34 |
*
|
35 |
* @var string
|
36 |
*/
|
37 |
+
public $version = '1.0.85.1';
|
38 |
|
39 |
/**
|
40 |
* Rank Math database version.
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: seo, sitemap, google search console, schema, redirection, WordPress SEO
|
|
5 |
Tested up to: 5.9
|
6 |
Requires at least: 5.6
|
7 |
Requires PHP: 7.2
|
8 |
-
Stable tag: 1.0.85
|
9 |
License: GPL-2.0+
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.txt
|
11 |
|
@@ -580,6 +580,9 @@ Please drop us an email at support@rankmath.com and we would be more than happy
|
|
580 |
|
581 |
== Changelog ==
|
582 |
|
|
|
|
|
|
|
583 |
= 1.0.85 [Mar 23, 2022] =
|
584 |
* Added: Search field for in the property selection dropdown present in the [Analytics Module settings](https://rankmath.com/kb/general-settings/#search-console-settings)
|
585 |
* Improved: Increased the width of [tables present on the Analytics Pages](https://rankmath.com/kb/analytics/)
|
5 |
Tested up to: 5.9
|
6 |
Requires at least: 5.6
|
7 |
Requires PHP: 7.2
|
8 |
+
Stable tag: 1.0.85.1
|
9 |
License: GPL-2.0+
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.txt
|
11 |
|
580 |
|
581 |
== Changelog ==
|
582 |
|
583 |
+
= 1.0.85.1 [Mar 24, 2022] =
|
584 |
+
* Fixed: Trailing slashes were automatically added to [Source URL](https://rankmath.com/kb/setting-up-redirections/#source-urls) when creating a **new** Redirection rule
|
585 |
+
|
586 |
= 1.0.85 [Mar 23, 2022] =
|
587 |
* Added: Search field for in the property selection dropdown present in the [Analytics Module settings](https://rankmath.com/kb/general-settings/#search-console-settings)
|
588 |
* Improved: Increased the width of [tables present on the Analytics Pages](https://rankmath.com/kb/analytics/)
|
vendor/composer/installed.php
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
<?php return array(
|
2 |
'root' => array(
|
3 |
-
'pretty_version' => '
|
4 |
-
'version' => '
|
5 |
'type' => 'wordpress-plugin',
|
6 |
'install_path' => __DIR__ . '/../../',
|
7 |
'aliases' => array(),
|
8 |
-
'reference' => '
|
9 |
'name' => 'rankmath/seo-by-rank-math',
|
10 |
'dev' => true,
|
11 |
),
|
@@ -47,12 +47,12 @@
|
|
47 |
'dev_requirement' => false,
|
48 |
),
|
49 |
'rankmath/seo-by-rank-math' => array(
|
50 |
-
'pretty_version' => '
|
51 |
-
'version' => '
|
52 |
'type' => 'wordpress-plugin',
|
53 |
'install_path' => __DIR__ . '/../../',
|
54 |
'aliases' => array(),
|
55 |
-
'reference' => '
|
56 |
'dev_requirement' => false,
|
57 |
),
|
58 |
'woocommerce/action-scheduler' => array(
|
1 |
<?php return array(
|
2 |
'root' => array(
|
3 |
+
'pretty_version' => 'dev-develop',
|
4 |
+
'version' => 'dev-develop',
|
5 |
'type' => 'wordpress-plugin',
|
6 |
'install_path' => __DIR__ . '/../../',
|
7 |
'aliases' => array(),
|
8 |
+
'reference' => '2d2d81c3b3e8430cb979507dc76df4c38f8b19b4',
|
9 |
'name' => 'rankmath/seo-by-rank-math',
|
10 |
'dev' => true,
|
11 |
),
|
47 |
'dev_requirement' => false,
|
48 |
),
|
49 |
'rankmath/seo-by-rank-math' => array(
|
50 |
+
'pretty_version' => 'dev-develop',
|
51 |
+
'version' => 'dev-develop',
|
52 |
'type' => 'wordpress-plugin',
|
53 |
'install_path' => __DIR__ . '/../../',
|
54 |
'aliases' => array(),
|
55 |
+
'reference' => '2d2d81c3b3e8430cb979507dc76df4c38f8b19b4',
|
56 |
'dev_requirement' => false,
|
57 |
),
|
58 |
'woocommerce/action-scheduler' => array(
|