Skip to content

Commit

Permalink
Merge pull request #936 from ddonnini/bugfix-region-updater
Browse files Browse the repository at this point in the history
Bugfix for regions with single quote in name
  • Loading branch information
vpelipenko committed Jan 14, 2015
2 parents fc916fb + fc36590 commit dad5614
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,10 @@ define([
*/
_renderSelectOption: function(selectElement, key, value) {
selectElement.append($.proxy(function() {
if (value.code && $(value.name).is('span')) {
var name = value.name.replace(/[!"#$%&'()*+,.\/:;<=>?@[\\\]^`{|}~]/g, "\\$&");
if (value.code && $(name).is('span')) {
key = value.code;
value.name = $(value.name).text();
value.name = $(name).text();
}
$.template('regionTemplate', this.options.regionTemplate);
if (this.options.defaultRegion === key) {
Expand Down Expand Up @@ -172,4 +173,4 @@ define([
});

return $.mage.regionUpdater;
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
*
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
class UpdateCustomerFrontendEntity extends Injectable
class UpdateCustomerFrontendEntityTest extends Injectable
{
/**
* Factory for Fixtures
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"customer/data/firstname";"customer/data/lastname";"customer/data/email";"address/data/firstname";"address/data/lastname";"address/data/company";"address/data/street";"address/data/city";"address/data/country_id";"address/data/region_id";"address/data/region";"address/data/telephone";"address/data/fax";"address/data/postcode";"constraint"
"Jany %isolation%";"Doe %isolation%";"janydoe%isolation%@example.com";"Jany %isolation%";"Doe %isolation%";"Company %isolation%";"Some street %isolation%";"City %isolation%";"United States";"Colorado";"-";"555-888-111-999";"161-999-8888";"12345";"assertCustomerAddressSuccessSaveMessage, assertCustomerDefaultAddresses"
"Jonny %isolation%";"Doe %isolation%";"jonny%isolation%@example.com";"John %isolation%";"Doe %isolation%";"Company %isolation%";"Some street %isolation%";"City %isolation%";"United Kingdom";"-";"Region %isolation%";"0123456789-02134567";"5555-874-99634";"12345";"assertCustomerAddressSuccessSaveMessage, assertCustomerDefaultAddresses"
"Jean %isolation%";"Reno %isolation%";"jean%isolation%@example.com";"Jean %isolation%";"Reno %isolation%";"Magento %isolation%";"18-20 Rue Maréchal Leclerc";"Quintin";"France";"Côtes-d'Armor";"-";"555-888-111-999";"161-999-8888";"12345";"assertCustomerAddressSuccessSaveMessage, assertCustomerDefaultAddresses"

0 comments on commit dad5614

Please sign in to comment.