@angular/core 10.2.4 → 10.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/core-testing.umd.js +1 -1
- package/bundles/core-testing.umd.min.js +1 -1
- package/bundles/core-testing.umd.min.js.map +1 -1
- package/bundles/core.umd.js +26 -13
- package/bundles/core.umd.js.map +1 -1
- package/bundles/core.umd.min.js +90 -90
- package/bundles/core.umd.min.js.map +1 -1
- package/core.d.ts +1 -1
- package/core.metadata.json +1 -1
- package/esm2015/src/util/dom.js +25 -12
- package/esm2015/src/version.js +1 -1
- package/fesm2015/core.js +26 -13
- package/fesm2015/core.js.map +1 -1
- package/fesm2015/testing.js +1 -1
- package/package.json +1 -1
- package/src/r3_symbols.d.ts +1 -1
- package/testing/testing.d.ts +1 -1
- package/testing.d.ts +1 -1
package/esm2015/src/util/dom.js
CHANGED
|
@@ -5,14 +5,26 @@
|
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
|
-
const END_COMMENT = /-->/g;
|
|
9
|
-
const END_COMMENT_ESCAPED = '-\u200B-\u200B>';
|
|
10
8
|
/**
|
|
11
|
-
*
|
|
9
|
+
* Disallowed strings in the comment.
|
|
10
|
+
*
|
|
11
|
+
* see: https://html.spec.whatwg.org/multipage/syntax.html#comments
|
|
12
|
+
*/
|
|
13
|
+
const COMMENT_DISALLOWED = /^>|^->|<!--|-->|--!>|<!-$/g;
|
|
14
|
+
/**
|
|
15
|
+
* Delimiter in the disallowed strings which needs to be wrapped with zero with character.
|
|
16
|
+
*/
|
|
17
|
+
const COMMENT_DELIMITER = /(<|>)/;
|
|
18
|
+
const COMMENT_DELIMITER_ESCAPED = '\u200B$1\u200B';
|
|
19
|
+
/**
|
|
20
|
+
* Escape the content of comment strings so that it can be safely inserted into a comment node.
|
|
12
21
|
*
|
|
13
22
|
* The issue is that HTML does not specify any way to escape comment end text inside the comment.
|
|
14
|
-
* `<!-- The way you close a comment is with "
|
|
15
|
-
*
|
|
23
|
+
* Consider: `<!-- The way you close a comment is with ">", and "->" at the beginning or by "-->" or
|
|
24
|
+
* "--!>" at the end. -->`. Above the `"-->"` is meant to be text not an end to the comment. This
|
|
25
|
+
* can be created programmatically through DOM APIs. (`<!--` are also disallowed.)
|
|
26
|
+
*
|
|
27
|
+
* see: https://html.spec.whatwg.org/multipage/syntax.html#comments
|
|
16
28
|
*
|
|
17
29
|
* ```
|
|
18
30
|
* div.innerHTML = div.innerHTML
|
|
@@ -23,14 +35,15 @@ const END_COMMENT_ESCAPED = '-\u200B-\u200B>';
|
|
|
23
35
|
* opening up the application for XSS attack. (In SSR we programmatically create comment nodes which
|
|
24
36
|
* may contain such text and expect them to be safe.)
|
|
25
37
|
*
|
|
26
|
-
* This function escapes the comment text by looking for
|
|
27
|
-
*
|
|
28
|
-
* contains
|
|
29
|
-
* comment.
|
|
38
|
+
* This function escapes the comment text by looking for comment delimiters (`<` and `>`) and
|
|
39
|
+
* surrounding them with `_>_` where the `_` is a zero width space `\u200B`. The result is that if a
|
|
40
|
+
* comment contains any of the comment start/end delimiters (such as `<!--`, `-->` or `--!>`) the
|
|
41
|
+
* text it will render normally but it will not cause the HTML parser to close/open the comment.
|
|
30
42
|
*
|
|
31
|
-
* @param value text to make safe for comment node by escaping the comment close character
|
|
43
|
+
* @param value text to make safe for comment node by escaping the comment open/close character
|
|
44
|
+
* sequence.
|
|
32
45
|
*/
|
|
33
46
|
export function escapeCommentText(value) {
|
|
34
|
-
return value.replace(
|
|
47
|
+
return value.replace(COMMENT_DISALLOWED, (text) => text.replace(COMMENT_DELIMITER, COMMENT_DELIMITER_ESCAPED));
|
|
35
48
|
}
|
|
36
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
49
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZG9tLmpzIiwic291cmNlUm9vdCI6IiIsInN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wZW4gdGhlIGNvbW1lbnQuXG4gKlxuICogQHBhcmFtIHZhbHVlIHRleHQgdG8gbWFrZSBzYWZlIGZvciBjb21tZW50IG5vZGUgYnkgZXNjYXBpbmcgdGhlIGNvbW1lbnQgb3Blbi9jbG9zZSBjaGFyYWN0ZXJcbiAqICAgICBzZXF1ZW5jZS5cbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGVzY2FwZUNvbW1lbnRUZXh0KHZhbHVlOiBzdHJpbmcpOiBzdHJpbmcge1xuICByZXR1cm4gdmFsdWUucmVwbGFjZShcbiAgICAgIENPTU1FTlRfRElTQUxMT1dFRCwgKHRleHQpID0+IHRleHQucmVwbGFjZShDT01NRU5UX0RFTElNSVRFUiwgQ09NTUVOVF9ERUxJTUlURVJfRVNDQVBFRCkpO1xufSJdfQ==
|
package/esm2015/src/version.js
CHANGED
|
@@ -21,5 +21,5 @@ export class Version {
|
|
|
21
21
|
/**
|
|
22
22
|
* @publicApi
|
|
23
23
|
*/
|
|
24
|
-
export const VERSION = new Version('10.2.
|
|
24
|
+
export const VERSION = new Version('10.2.5');
|
|
25
25
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2NvcmUvc3JjL3ZlcnNpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztHQU1HO0FBRUg7Ozs7R0FJRztBQUNILE1BQU0sT0FBTyxPQUFPO0lBS2xCLFlBQW1CLElBQVk7UUFBWixTQUFJLEdBQUosSUFBSSxDQUFRO1FBQzdCLElBQUksQ0FBQyxLQUFLLEdBQUcsSUFBSSxDQUFDLEtBQUssQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQztRQUNoQyxJQUFJLENBQUMsS0FBSyxHQUFHLElBQUksQ0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1xuICAgIHRoaXMucGF0Y2ggPSBmdWxsLnNwbGl0KCcuJykuc2xpY2UoMikuam9pbignLicpO1xuICB9XG59XG5cbi8qKlxuICogQHB1YmxpY0FwaVxuICovXG5leHBvcnQgY29uc3QgVkVSU0lPTiA9IG5ldyBWZXJzaW9uKCcwLjAuMC1QTEFDRUhPTERFUicpO1xuIl19
|
package/fesm2015/core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v10.2.
|
|
2
|
+
* @license Angular v10.2.5
|
|
3
3
|
* (c) 2010-2020 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -5341,14 +5341,26 @@ function getSanitizer() {
|
|
|
5341
5341
|
* Use of this source code is governed by an MIT-style license that can be
|
|
5342
5342
|
* found in the LICENSE file at https://angular.io/license
|
|
5343
5343
|
*/
|
|
5344
|
-
const END_COMMENT = /-->/g;
|
|
5345
|
-
const END_COMMENT_ESCAPED = '-\u200B-\u200B>';
|
|
5346
5344
|
/**
|
|
5347
|
-
*
|
|
5345
|
+
* Disallowed strings in the comment.
|
|
5346
|
+
*
|
|
5347
|
+
* see: https://html.spec.whatwg.org/multipage/syntax.html#comments
|
|
5348
|
+
*/
|
|
5349
|
+
const COMMENT_DISALLOWED = /^>|^->|<!--|-->|--!>|<!-$/g;
|
|
5350
|
+
/**
|
|
5351
|
+
* Delimiter in the disallowed strings which needs to be wrapped with zero with character.
|
|
5352
|
+
*/
|
|
5353
|
+
const COMMENT_DELIMITER = /(<|>)/;
|
|
5354
|
+
const COMMENT_DELIMITER_ESCAPED = '\u200B$1\u200B';
|
|
5355
|
+
/**
|
|
5356
|
+
* Escape the content of comment strings so that it can be safely inserted into a comment node.
|
|
5348
5357
|
*
|
|
5349
5358
|
* The issue is that HTML does not specify any way to escape comment end text inside the comment.
|
|
5350
|
-
* `<!-- The way you close a comment is with "
|
|
5351
|
-
*
|
|
5359
|
+
* Consider: `<!-- The way you close a comment is with ">", and "->" at the beginning or by "-->" or
|
|
5360
|
+
* "--!>" at the end. -->`. Above the `"-->"` is meant to be text not an end to the comment. This
|
|
5361
|
+
* can be created programmatically through DOM APIs. (`<!--` are also disallowed.)
|
|
5362
|
+
*
|
|
5363
|
+
* see: https://html.spec.whatwg.org/multipage/syntax.html#comments
|
|
5352
5364
|
*
|
|
5353
5365
|
* ```
|
|
5354
5366
|
* div.innerHTML = div.innerHTML
|
|
@@ -5359,15 +5371,16 @@ const END_COMMENT_ESCAPED = '-\u200B-\u200B>';
|
|
|
5359
5371
|
* opening up the application for XSS attack. (In SSR we programmatically create comment nodes which
|
|
5360
5372
|
* may contain such text and expect them to be safe.)
|
|
5361
5373
|
*
|
|
5362
|
-
* This function escapes the comment text by looking for
|
|
5363
|
-
*
|
|
5364
|
-
* contains
|
|
5365
|
-
* comment.
|
|
5374
|
+
* This function escapes the comment text by looking for comment delimiters (`<` and `>`) and
|
|
5375
|
+
* surrounding them with `_>_` where the `_` is a zero width space `\u200B`. The result is that if a
|
|
5376
|
+
* comment contains any of the comment start/end delimiters (such as `<!--`, `-->` or `--!>`) the
|
|
5377
|
+
* text it will render normally but it will not cause the HTML parser to close/open the comment.
|
|
5366
5378
|
*
|
|
5367
|
-
* @param value text to make safe for comment node by escaping the comment close character
|
|
5379
|
+
* @param value text to make safe for comment node by escaping the comment open/close character
|
|
5380
|
+
* sequence.
|
|
5368
5381
|
*/
|
|
5369
5382
|
function escapeCommentText(value) {
|
|
5370
|
-
return value.replace(
|
|
5383
|
+
return value.replace(COMMENT_DISALLOWED, (text) => text.replace(COMMENT_DELIMITER, COMMENT_DELIMITER_ESCAPED));
|
|
5371
5384
|
}
|
|
5372
5385
|
|
|
5373
5386
|
/**
|
|
@@ -21109,7 +21122,7 @@ class Version {
|
|
|
21109
21122
|
/**
|
|
21110
21123
|
* @publicApi
|
|
21111
21124
|
*/
|
|
21112
|
-
const VERSION = new Version('10.2.
|
|
21125
|
+
const VERSION = new Version('10.2.5');
|
|
21113
21126
|
|
|
21114
21127
|
/**
|
|
21115
21128
|
* @license
|