Skip to content

Commit 2aaa4c0

Browse files
committed
Merge branch 'release/2.4.2'
2 parents d28f95a + 4550551 commit 2aaa4c0

File tree

3 files changed

+23
-11
lines changed

3 files changed

+23
-11
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## [2.4.2](https://github.com/rvola/wp-original-media-path/tree/2.4.2) - 2023-03-30
4+
[Full Changelog](https://github.com/rvola/wp-original-media-path/compare/2.4.1...2.4.2)
5+
6+
* Check WP 6.2
7+
* Revert "Improve force to clean input regex"
8+
39
## [2.4.1](https://github.com/rvola/wp-original-media-path/tree/2.4.1) - 2023-01-23
410
[Full Changelog](https://github.com/rvola/wp-original-media-path/compare/2.4.0...2.4.1)
511

readme.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ Donate link: https://www.paypal.me/rvola
44
Tags: media, upload, path, subdomain
55
Requires PHP: 7.0
66
Requires at least: 3.5
7-
Tested up to: 6.1
8-
Stable tag: 2.4.1
7+
Tested up to: 6.2
8+
Stable tag: 2.4.2
99
License: GPLv3
1010
License URI: https://www.gnu.org/licenses/gpl-3.0.html
1111

@@ -77,6 +77,10 @@ The GIT repository is available here [https://github.com/rvola/wp-original-media
7777

7878
== Changelog ==
7979

80+
= 2.4.2 | 2023-03-30 =
81+
* Check WP 6.2
82+
* Revert "Improve force to clean input regex"
83+
8084
= 2.4.1 | 2023-01-13 =
8185
* Placeholder minor modification
8286
* Improve force to clean input regex

wp_original_media_path.php

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
66
Description: Change the location for the uploads folder for WordPress
77
8-
Version: 2.4.1
9-
Revision: 2023-01-23
8+
Version: 2.4.2
9+
Revision: 2023-03-30
1010
Creation: 2013-01-06
1111
1212
Author: RVOLA
@@ -16,7 +16,7 @@
1616
Domain Path: /languages/
1717
1818
Requires at least: 3.5
19-
Tested up to: 6.1
19+
Tested up to: 6.2
2020
Requires PHP: 7.0
2121
2222
License: GPLv3
@@ -34,7 +34,7 @@ final class WPOMP {
3434
const NAME = "WP Original Media Path";
3535
const I18N = "wp-original-media-path";
3636
const SLUG = "wpomp";
37-
const VERSION = "2.4.1";
37+
const VERSION = "2.4.2";
3838

3939
private static $singleton = null;
4040

@@ -121,11 +121,13 @@ public static function setPath( $url ) {
121121
public static function cleanValue( $value ) {
122122
$value = esc_html( $value );
123123

124-
$value = strtolower( $value );
125-
$value = remove_accents( $value );
126-
$value = preg_replace( '/[^a-z0-9-_:?@=#\.\/]/', '', $value );
127-
$value = rtrim( $value, '/\\' );
128-
$value = trim( $value, '/\\' );
124+
if ( get_option( 'wpomp_mode' ) != true ) {
125+
$value = strtolower( $value );
126+
$value = remove_accents( $value );
127+
$value = preg_replace( '/[^a-z0-9-_:\.\/]/', '', $value );
128+
$value = rtrim( $value, '/\\' );
129+
$value = trim( $value, '/\\' );
130+
}
129131

130132
return $value;
131133
}

0 commit comments

Comments
 (0)