From 60189b20e1f5853d60e62608004627b802f8a9fc Mon Sep 17 00:00:00 2001 From: Michael Torbert Date: Mon, 14 Nov 2016 18:35:04 -0500 Subject: [PATCH] fix newline detection with preg_split instead of explode #658 --- modules/aioseop_bad_robots.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/aioseop_bad_robots.php b/modules/aioseop_bad_robots.php index bf3f6d198..07d26f211 100644 --- a/modules/aioseop_bad_robots.php +++ b/modules/aioseop_bad_robots.php @@ -190,7 +190,7 @@ function generate_htaccess_blocklist() { */ function filter_bad_referlist( $referlist ) { if ( $this->option_isset( 'edit_blocks' ) && $this->option_isset( 'block_refer' ) && $this->option_isset( 'referlist' ) ) { - $referlist = explode( "\n", $this->options["{$this->prefix}referlist"] ); + $referlist = preg_split('/\r\n|[\r\n]/', $this->options["{$this->prefix}referlist"] ); } return $referlist; @@ -203,7 +203,7 @@ function filter_bad_referlist( $referlist ) { */ function filter_bad_botlist( $botlist ) { if ( $this->option_isset( 'edit_blocks' ) && $this->option_isset( 'blocklist' ) ) { - $botlist = explode( "\n", $this->options["{$this->prefix}blocklist"] ); + $botlist = preg_split('/\r\n|[\r\n]/', $this->options["{$this->prefix}blocklist"] ); } return $botlist;