Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Ricardo Freitas committed Jun 16, 2023
1 parent 61eea57 commit 521a132
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 11 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,22 @@

All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org/) for commit guidelines.

## [2.1.4](https://github.com/wpmudev/hustle-ui/compare/v2.1.3...v2.1.4) (2023-16-06)
#### 🐛 Bug Fixes
- `validation`
- **fix(validation):** Escaped js from validation messages. [#91](https://github.com/wpmudev/hustle-ui/pull/91) ([@creadordev](https://github.com/creadordev))

#### Committers: 1
- Pawan Kumar ([@creador-dev](https://github.com/creador-dev))

## [2.1.3](https://github.com/wpmudev/hustle-ui/compare/v2.1.2...v2.1.3) (2023-13-06)
#### 🐛 Bug Fixes
- `dialog`
- **fix(dialog):** Unnecessary scrollbar and outline appears in slide in and popup. [#87](https://github.com/wpmudev/hustle-ui/pull/87) ([@creadordev](https://github.com/creadordev))

#### Committers: 1
- Pawan Kumar ([@creador-dev](https://github.com/creador-dev))

## [2.1.2](https://github.com/wpmudev/hustle-ui/compare/v2.1.1...v2.1.2) (2023-09-06)
#### 🐛 Bug Fixes
- `slide in`
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ Please read through our [contributing guidelines](https://github.com/wpmudev/hus

1. Review and merge all PRs into `development` branch.
2. You will need to be added as member of [WPMU DEV Organization](https://github.com/orgs/wpmudev/people) before the next step.
3. Execute `git checkout master` (do not push commits directly to this branch and make sure there are no residual folders nor files form development branch).
4. Assign the correct version executing `git tag v4.0.0`. Replace the version number with the correspondent new version.
5. Push the version number using `git push --tags`
6. Run `npm run deploy:hustle`
7. Run `npm run deploy:demo`
3. Run `npm run deploy:hustle`
4. Run `npm run deploy:demo`
5. Execute `git checkout master` (do not push commits directly to this branch and make sure there are no residual folders nor files form development branch).
6. Assign the correct version executing `git tag v4.0.0`. Replace the version number with the correspondent new version.
7. Push the version number using `git push --tags`

**Remember:** Pull Requests will be approved **only** if have their changes listed on `CHANGELOG.md` file.
18 changes: 15 additions & 3 deletions js/hustle-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,18 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
(function ($) {
'use strict';

// Define global HUI object if it doesn't exist.
if ('object' !== _typeof(window.HUI)) {
window.HUI = {};
}
HUI.escapeJS = function (string) {
// Return the escaped text
return string.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, '');
};
})(jQuery);
(function ($) {
'use strict';

// Define global HUI object if it doesn't exist.
if ('object' !== _typeof(window.HUI)) {
window.HUI = {};
Expand Down Expand Up @@ -427,15 +439,15 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
return true;
}
if (first) {
message.append('<p>' + element + '</p>');
message.append('<p>' + HUI.escapeJS(element) + '</p>');
first = false;
} else {
$('<div class="hustle-error-message"><p>' + element + '</p></div>').appendTo($form);
$('<div class="hustle-error-message"><p>' + HUI.escapeJS(element) + '</p></div>').appendTo($form);
}
});
}
if ('undefined' === typeof errors || first) {
message.append('<p>' + message.data('default-error') + '</p>');
message.append('<p>' + HUI.escapeJS(message.data('default-error')) + '</p>');
}
message.show();
}
Expand Down
Loading

0 comments on commit 521a132

Please sign in to comment.