wpForo Forum - Version 1.8.4

Version Description

Download this release

Release Info

Developer Tomdever
Plugin Icon 128x128 wpForo Forum
Version 1.8.4
Comparing to
See all releases

Code changes from version 1.8.3 to 1.8.4

readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: gVectors Team
3
  Tags: forum, forums, forum plugin, WordPress forum plugin, community, discussion
4
  Requires at least: 4.1
5
  Tested up to: 5.5
6
- Stable tag: 1.8.3
7
  Requires PHP: 5.6 and higher
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -165,14 +165,18 @@ Find wpForo forum plugin addons on [gVectors Team website...](https://gvectors.c
165
 
166
  == Changelog ==
167
 
168
- = wpForo Forum 1.8.3 | 12.08.2020 =
169
 
170
- [wpForo Forum v1.8.3 Release Summary](https://wpforo.com/community/wpforo-announcements/wpforo-1-8-3-is-released/)
171
 
 
 
 
 
 
172
  * Added: WordPress 5.5 compatibility
173
  * Optimized: Forum fulltext search functions
174
  * Fixed Bug: Allow edit reply titles in threaded layout
175
- * Fixed Bug: Stop changing attachments paths to relative by TinyMCE
176
  * Fixed Bug: Advanced search bug in search widget and menu forms
177
  * Fixed Bug: Remove Advanced search options button from Tags search
178
 
3
  Tags: forum, forums, forum plugin, WordPress forum plugin, community, discussion
4
  Requires at least: 4.1
5
  Tested up to: 5.5
6
+ Stable tag: 1.8.4
7
  Requires PHP: 5.6 and higher
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
165
 
166
  == Changelog ==
167
 
168
+ = wpForo Forum 1.8.3 / 1.8.4 | 17.08.2020 =
169
 
170
+ [wpForo Forum v1.8.3 / 1.8.4 Release Summary](https://wpforo.com/community/wpforo-announcements/wpforo-1-8-3-is-released/)
171
 
172
+ * version 1.8.4
173
+ * Fixed Bug: Stop changing attachments paths to relative by TinyMCE
174
+ * Fixed Bug: Backslashes issues in the post content
175
+ * -----
176
+ * version 1.8.3
177
  * Added: WordPress 5.5 compatibility
178
  * Optimized: Forum fulltext search functions
179
  * Fixed Bug: Allow edit reply titles in threaded layout
 
180
  * Fixed Bug: Advanced search bug in search widget and menu forms
181
  * Fixed Bug: Remove Advanced search options button from Tags search
182
 
wpf-includes/class-forms.php CHANGED
@@ -464,7 +464,7 @@ class wpForoForm{
464
  if( empty($f['wp_editor_settings']) ) $f['wp_editor_settings'] = WPF()->tpl->editor_buttons();
465
  $f['wp_editor_settings']['textarea_name'] = $f['fieldName'];
466
  ob_start();
467
- wp_editor( wpautop(wp_unslash($f['value'])), $f['textareaid'], $f['wp_editor_settings'] );
468
  if( $f['fieldKey'] === 'body' ) $this->form_extra($f);
469
  return ob_get_clean();
470
  }
464
  if( empty($f['wp_editor_settings']) ) $f['wp_editor_settings'] = WPF()->tpl->editor_buttons();
465
  $f['wp_editor_settings']['textarea_name'] = $f['fieldName'];
466
  ob_start();
467
+ wp_editor( wpautop($f['value']), $f['textareaid'], $f['wp_editor_settings'] );
468
  if( $f['fieldKey'] === 'body' ) $this->form_extra($f);
469
  return ob_get_clean();
470
  }
wpf-includes/class-posts.php CHANGED
@@ -1799,6 +1799,7 @@ class wpForoPost{
1799
  /**
1800
  * apply old options to fields
1801
  */
 
1802
  foreach( $fields as $kr => $row ){
1803
  foreach( $row as $kc => $cols ){
1804
  foreach( $cols as $kf => $field ){
@@ -1875,6 +1876,7 @@ class wpForoPost{
1875
  /**
1876
  * apply old options to fields
1877
  */
 
1878
  foreach( $fields as $kr => $row ){
1879
  foreach( $row as $kc => $cols ){
1880
  foreach( $cols as $kf => $field ){
@@ -2051,6 +2053,7 @@ class wpForoPost{
2051
 
2052
  public function get_search_fields($values){
2053
  $values = (array) $values;
 
2054
  $fields = $this->get_fields();
2055
 
2056
  $topic_fields = WPF()->post->get_topic_fields_list();
1799
  /**
1800
  * apply old options to fields
1801
  */
1802
+ $values = wp_slash($values);
1803
  foreach( $fields as $kr => $row ){
1804
  foreach( $row as $kc => $cols ){
1805
  foreach( $cols as $kf => $field ){
1876
  /**
1877
  * apply old options to fields
1878
  */
1879
+ $values = wp_slash($values);
1880
  foreach( $fields as $kr => $row ){
1881
  foreach( $row as $kc => $cols ){
1882
  foreach( $cols as $kf => $field ){
2053
 
2054
  public function get_search_fields($values){
2055
  $values = (array) $values;
2056
+ $values = wp_slash($values);
2057
  $fields = $this->get_fields();
2058
 
2059
  $topic_fields = WPF()->post->get_topic_fields_list();
wpf-includes/functions.php CHANGED
@@ -481,10 +481,9 @@ function wpforo_admin_tools_tabs( $tabs, $current = 'antispam', $subtab = FALSE,
481
  }
482
 
483
  function wpforo_content_filter( $content ){
484
- if( strpos($content, '../') !== FALSE ){
485
- $home_url = trim( home_url(), '/\\' ) . '/';
486
- $content = preg_replace('|https*\:\/\/[\.\/]+|i', $home_url, $content); //src="https://../../../wp-content/
487
- $content = preg_replace('|([\"\']+)([\.\/]+)(wp-content\/)|i', "$1" . $home_url ."$3", $content); //src="../../../wp-content/
488
  }
489
  $content = apply_filters('wpforo_body_text_filter', $content);
490
  $content = preg_replace('#([^\'\"]|^)(https?://[^\s\'\"<>]+\.(?:jpg|jpeg|png|gif|ico|svg|bmp|tiff))([^\'\"]|$)#isu', '$1 <a class="wpforo-auto-embeded-link" href="$2" target="_blank"><img class="wpforo-auto-embeded-image" src="$2"/></a> $3', $content);
481
  }
482
 
483
  function wpforo_content_filter( $content ){
484
+ if( strpos($content, '../') !== false ){
485
+ $home_url = trim( preg_replace( array('#/?\?.*$#isu', '#index\.php/?#isu') , '', home_url() ), '/\\' ) . '/';
486
+ $content = preg_replace('#((?:href|src)=[\'\"])(?:https?://)?(?:\.+/)+wp-content/#i', "$1" . $home_url . "wp-content/", $content);
 
487
  }
488
  $content = apply_filters('wpforo_body_text_filter', $content);
489
  $content = preg_replace('#([^\'\"]|^)(https?://[^\s\'\"<>]+\.(?:jpg|jpeg|png|gif|ico|svg|bmp|tiff))([^\'\"]|$)#isu', '$1 <a class="wpforo-auto-embeded-link" href="$2" target="_blank"><img class="wpforo-auto-embeded-image" src="$2"/></a> $3', $content);
wpforo.php CHANGED
@@ -5,14 +5,14 @@
5
  * Description: WordPress Forum plugin. wpForo is a full-fledged forum solution for your community. Comes with multiple modern forum layouts.
6
  * Author: gVectors Team
7
  * Author URI: https://gvectors.com/
8
- * Version: 1.8.3
9
  * Text Domain: wpforo
10
  * Domain Path: /wpf-languages
11
  */
12
 
13
  //Exit if accessed directly
14
  if( !defined( 'ABSPATH' ) ) exit;
15
- if( !defined( 'WPFORO_VERSION' ) ) define('WPFORO_VERSION', '1.8.3');
16
 
17
  function wpforo_load_plugin_textdomain() { load_plugin_textdomain( 'wpforo', FALSE, basename( dirname( __FILE__ ) ) . '/wpf-languages/' ); }
18
  add_action( 'plugins_loaded', 'wpforo_load_plugin_textdomain' );
5
  * Description: WordPress Forum plugin. wpForo is a full-fledged forum solution for your community. Comes with multiple modern forum layouts.
6
  * Author: gVectors Team
7
  * Author URI: https://gvectors.com/
8
+ * Version: 1.8.4
9
  * Text Domain: wpforo
10
  * Domain Path: /wpf-languages
11
  */
12
 
13
  //Exit if accessed directly
14
  if( !defined( 'ABSPATH' ) ) exit;
15
+ if( !defined( 'WPFORO_VERSION' ) ) define('WPFORO_VERSION', '1.8.4');
16
 
17
  function wpforo_load_plugin_textdomain() { load_plugin_textdomain( 'wpforo', FALSE, basename( dirname( __FILE__ ) ) . '/wpf-languages/' ); }
18
  add_action( 'plugins_loaded', 'wpforo_load_plugin_textdomain' );