Fix vulnerable.

This commit is contained in:
BoHung Chiu 2022-11-01 13:20:14 +08:00
parent 30ac79c890
commit 17bd45b6fc
2 changed files with 6 additions and 3 deletions

View File

@ -2461,10 +2461,13 @@ $.fn.wpexEqualHeights = function (options) {
var elID = $this.attr( 'id' ); var elID = $this.attr( 'id' );
var elClass = elID ? ' wpex-' + elID : ''; var elClass = elID ? ' wpex-' + elID : '';
if ( $this.is( ':visible' ) ) { if ( $this.is( ':visible' ) ) {
var wpex_wrap = $('<div></div>');
wpex_wrap.insertBefore($this);
wpex_wrap.append($this);
if ( $this.attr( 'multiple' ) ) { if ( $this.attr( 'multiple' ) ) {
$this.wrap( '<div class="wpex-multiselect-wrap' + elClass + '"></div>' ); wpex_wrap.attr('class', 'wpex-multiselect-wrap' + elClass);
} else { } else {
$this.wrap( '<div class="wpex-select-wrap' + elClass + '"></div>' ); wpex_wrap.attr('class', 'wpex-select-wrap' + elClass);
} }
} }
} ); } );

View File

@ -330,7 +330,7 @@ module EventNewsHelper
if @target_action == "index" if @target_action == "index"
filename = overridehtml.nil? ? params[:layout_type].to_s.split('/').last : overridehtml filename = File.basename(overridehtml.nil? ? params[:layout_type] : overridehtml)
f = File.join(Rails.root, 'app', 'templates', "#{@key}", 'modules', 'event_news_mod', "#{filename}.html.erb") f = File.join(Rails.root, 'app', 'templates', "#{@key}", 'modules', 'event_news_mod', "#{filename}.html.erb")
if !File.exists?f if !File.exists?f
f = File.join(Rails.root, 'app', 'templates', "#{@key}", 'modules', 'event_news_mod', "index.html.erb") f = File.join(Rails.root, 'app', 'templates', "#{@key}", 'modules', 'event_news_mod', "index.html.erb")