Commit 3b192f93 authored by dsnopek's avatar dsnopek Committed by dsnopek

Issue #3036217 by dsnopek: [context] Update for SA-CONTRIB-2019-028

parent 5f0d51ef
diff --git a/context_ui/context_ui.js b/context_ui/context_ui.js
index ab96059..f098dbb 100644
--- a/context_ui/context_ui.js
+++ b/context_ui/context_ui.js
@@ -45,7 +45,7 @@ Drupal.behaviors.context_ui = function(context) {
$(this).click(function() {
// Retrieve region & block id from row
var region = $(this).parents('table').attr('id').substr(18);
- var bid = $(this).parents('tr').eq(0).remove().attr('id');
+ var bid = Drupal.checkPlain($(this).parents('tr').eq(0).remove().attr('id'));
// Return this block to the selector
$('div.context-ui-block-selector input[value='+bid+']').attr('checked', 0).parents('div.form-item').eq(0).show();
@@ -56,7 +56,7 @@ Drupal.behaviors.context_ui = function(context) {
});
// Hide blocks in the selector that are enabled
- var bid = $(this).parents('tr').eq(0).attr('id');
+ var bid = Drupal.checkPlain($(this).parents('tr').eq(0).attr('id'));
$('div.context-ui-block-selector input[value='+bid+']').parents('div.form-item').eq(0).hide();
$(this).addClass('contextui-processed');
});
diff --git a/plugins/context_reaction_block.js b/plugins/context_reaction_block.js
index 67e2031..78508bd 100644
--- a/plugins/context_reaction_block.js
+++ b/plugins/context_reaction_block.js
@@ -64,7 +64,7 @@ DrupalContextBlockForm = function(blockForm) {
// Hide enabled blocks from selector that are used
$('table.context-blockform-region tr').each(function() {
- var bid = $(this).attr('id');
+ var bid = Drupal.checkPlain($(this).attr('id'));
$('div.context-blockform-selector input[value='+bid+']').parents('div.form-item').eq(0).hide();
});
// Show blocks in selector that are unused
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment