Fix vulnerable.

This commit is contained in:
BoHung Chiu 2022-11-01 13:19:10 +08:00
parent bfa94e6090
commit 2b0f915f35
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

@ -292,7 +292,7 @@ module AnnouncementsHelper
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', 'announcement', "#{filename}.html.erb") f = File.join(Rails.root, 'app', 'templates', "#{@key}", 'modules', 'announcement', "#{filename}.html.erb")
if !File.exists?f if !File.exists?f
f = File.join(Rails.root, 'app', 'templates', "#{@key}", 'modules', 'announcement', "index.html.erb") f = File.join(Rails.root, 'app', 'templates', "#{@key}", 'modules', 'announcement', "index.html.erb")