Skip to content

Commit

Permalink
Escape Js Quote for layout updates
Browse files Browse the repository at this point in the history
  • Loading branch information
bchatard committed Jun 10, 2016
1 parent ef6ad27 commit f93a4d5
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,18 @@ public function __construct(
parent::__construct($context, $data);
}

/**
* {@inheritdoc}
*
* Add escapeJsQuote on $label
*/
public function addOption($value, $label, $params = [])
{
$label = $this->escapeJsQuote($label);

return parent::addOption($value, $label, $params);
}

/**
* Add necessary options
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,18 @@ public function __construct(
parent::__construct($context, $data);
}

/**
* {@inheritdoc}
*
* Add escapeJsQuote on $label
*/
public function addOption($value, $label, $params = [])
{
$label = $this->escapeJsQuote($label);

return parent::addOption($value, $label, $params);
}

/**
* Add necessary options
*
Expand Down

0 comments on commit f93a4d5

Please sign in to comment.