Skip to content

Commit 7bd9b7b

Browse files
authored
Merge pull request #990 from bitovi/notifications-text
Escape text in notifications + bump node version
2 parents 14d0e95 + 9dcaa31 commit 7bd9b7b

File tree

6 files changed

+11
-4
lines changed

6 files changed

+11
-4
lines changed

CHANGELOG.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Changed
1717

1818
Reported by @cded from @Bitovi
1919

20+
2021
Fixed
2122
~~~~~
2223
* Fixed CircleCI tests
@@ -27,6 +28,10 @@ Fixed
2728

2829
Contributed by @luislobo
2930

31+
* Escaped text in notifications. #990
32+
33+
Contributed by @cded from @Bitovi
34+
3035

3136
v2.4.3
3237
------

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:14.20.0
1+
FROM node:14.20.1
22

33
# Create app directory
44
WORKDIR /opt/stackstorm/static/webui/st2web

Dockerfile-dev

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:14.20.0
1+
FROM node:14.20.1
22

33
# Create app directory
44
WORKDIR /opt/stackstorm/static/webui/st2web

Dockerfile-nginx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:14.20.0 as build
1+
FROM node:14.20.1 as build
22

33
# Create app directory
44
WORKDIR /opt/stackstorm/static/webui/st2web

Dockerfile-nginx-dev

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:14.20.0 as build
1+
FROM node:14.20.1 as build
22

33
# Create app directory
44
WORKDIR /opt/stackstorm/static/webui/st2web

modules/st2-notification/notification.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
14+
const escapeHtml = require('escape-html');
1415

1516
const Noty = (function() {
1617
// don't include this during testing
@@ -43,6 +44,7 @@ export class Notification {
4344
}
4445

4546
notify(type, text, { buttons = [], err, execution_id, ...options } = {}) {
47+
text = escapeHtml(text);
4648
if (err) {
4749
let expanded = !!execution_id;
4850
let stack = null;

0 commit comments

Comments
 (0)