@angular/core 20.3.17 → 20.3.18

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.
Files changed (70) hide show
  1. package/api.d.d.ts +1 -1
  2. package/chrome_dev_tools_performance.d.d.ts +1 -1
  3. package/discovery.d.d.ts +1 -1
  4. package/effect.d.d.ts +1 -1
  5. package/event_dispatcher.d.d.ts +1 -1
  6. package/fesm2022/attribute.mjs +1 -1
  7. package/fesm2022/attribute.mjs.map +1 -1
  8. package/fesm2022/core.mjs +1 -1
  9. package/fesm2022/core.mjs.map +1 -1
  10. package/fesm2022/debug_node.mjs +12 -10
  11. package/fesm2022/debug_node.mjs.map +1 -1
  12. package/fesm2022/effect.mjs +1 -1
  13. package/fesm2022/effect.mjs.map +1 -1
  14. package/fesm2022/not_found.mjs +1 -1
  15. package/fesm2022/not_found.mjs.map +1 -1
  16. package/fesm2022/primitives/di.mjs +1 -1
  17. package/fesm2022/primitives/di.mjs.map +1 -1
  18. package/fesm2022/primitives/event-dispatch.mjs +1 -1
  19. package/fesm2022/primitives/event-dispatch.mjs.map +1 -1
  20. package/fesm2022/primitives/signals.mjs +1 -1
  21. package/fesm2022/primitives/signals.mjs.map +1 -1
  22. package/fesm2022/resource.mjs +1 -1
  23. package/fesm2022/resource.mjs.map +1 -1
  24. package/fesm2022/root_effect_scheduler.mjs +2 -2
  25. package/fesm2022/root_effect_scheduler.mjs.map +1 -1
  26. package/fesm2022/rxjs-interop.mjs +1 -1
  27. package/fesm2022/rxjs-interop.mjs.map +1 -1
  28. package/fesm2022/signal.mjs +1 -1
  29. package/fesm2022/signal.mjs.map +1 -1
  30. package/fesm2022/testing.mjs +1 -1
  31. package/fesm2022/testing.mjs.map +1 -1
  32. package/fesm2022/weak_ref.mjs +1 -1
  33. package/fesm2022/weak_ref.mjs.map +1 -1
  34. package/formatter.d.d.ts +1 -1
  35. package/index.d.ts +1 -1
  36. package/package.json +2 -2
  37. package/primitives/di/index.d.ts +1 -1
  38. package/primitives/event-dispatch/index.d.ts +1 -1
  39. package/primitives/signals/index.d.ts +1 -1
  40. package/rxjs-interop/index.d.ts +1 -1
  41. package/schematics/bundles/add-bootstrap-context-to-server-main.cjs +5 -5
  42. package/schematics/bundles/{apply_import_manager-C-hIllzM.cjs → apply_import_manager-CTzEuFJw.cjs} +3 -3
  43. package/schematics/bundles/cleanup-unused-imports.cjs +5 -5
  44. package/schematics/bundles/{compiler_host-C7zi7NDP.cjs → compiler_host-Ber_JSyo.cjs} +2 -2
  45. package/schematics/bundles/control-flow-migration.cjs +3 -3
  46. package/schematics/bundles/document-core.cjs +5 -5
  47. package/schematics/bundles/imports-CIX-JgAN.cjs +1 -1
  48. package/schematics/bundles/{index-BdbAclL_.cjs → index-B8IUVpRW.cjs} +4 -4
  49. package/schematics/bundles/{index-CEqacA4Q.cjs → index-DUHSh_FI.cjs} +12 -12
  50. package/schematics/bundles/inject-flags.cjs +5 -5
  51. package/schematics/bundles/inject-migration.cjs +3 -3
  52. package/schematics/bundles/leading_space-D9nQ8UQC.cjs +1 -1
  53. package/schematics/bundles/{migrate_ts_type_references-BJnim1Tm.cjs → migrate_ts_type_references-DLcyIMjy.cjs} +5 -5
  54. package/schematics/bundles/ng_decorators-B5HCqr20.cjs +1 -1
  55. package/schematics/bundles/nodes-B16H9JUd.cjs +1 -1
  56. package/schematics/bundles/output-migration.cjs +6 -6
  57. package/schematics/bundles/{project_paths-qw-vHpyb.cjs → project_paths-D9GYMpqK.cjs} +3 -3
  58. package/schematics/bundles/{project_tsconfig_paths-C5dXM8JP.cjs → project_tsconfig_paths-MdN5DRlX.cjs} +5 -4
  59. package/schematics/bundles/property_name-BBwFuqMe.cjs +1 -1
  60. package/schematics/bundles/route-lazy-loading.cjs +3 -3
  61. package/schematics/bundles/router-current-navigation.cjs +4 -4
  62. package/schematics/bundles/self-closing-tags-migration.cjs +4 -4
  63. package/schematics/bundles/signal-input-migration.cjs +7 -7
  64. package/schematics/bundles/signal-queries-migration.cjs +7 -7
  65. package/schematics/bundles/signals.cjs +7 -7
  66. package/schematics/bundles/standalone-migration.cjs +4 -4
  67. package/schematics/bundles/symbol-VPWguRxr.cjs +1 -1
  68. package/schematics/bundles/test-bed-get.cjs +4 -4
  69. package/testing/index.d.ts +1 -1
  70. package/weak_ref.d.d.ts +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v20.3.17
2
+ * @license Angular v20.3.18
3
3
  * (c) 2010-2025 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */
@@ -5622,6 +5622,13 @@ const VALID_ATTRS = merge(URI_ATTRS, HTML_ATTRS, ARIA_ATTRS);
5622
5622
  // `Some content`, but strip `invalid-element` opening/closing tags. For some elements, though, we
5623
5623
  // don't want to preserve the content, if the elements themselves are going to be removed.
5624
5624
  const SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS = tagSet('script,style,template');
5625
+ /**
5626
+ * Attributes that are potential attach vectors and may need to be sanitized.
5627
+ */
5628
+ const SENSITIVE_ATTRS = merge(URI_ATTRS,
5629
+ // Note: we don't include these attributes in `URI_ATTRS`, because `URI_ATTRS` also
5630
+ // determines whether an attribute should be dropped when sanitizing an HTML string.
5631
+ tagSet('action,formaction,data,codebase'));
5625
5632
  /**
5626
5633
  * SanitizingHtmlSerializer serializes a DOM fragment, stripping out any unsafe elements and unsafe
5627
5634
  * attributes.
@@ -14720,7 +14727,7 @@ class ComponentFactory extends ComponentFactory$1 {
14720
14727
  }
14721
14728
  function createRootTView(rootSelectorOrNode, componentDef, componentBindings, directives) {
14722
14729
  const tAttributes = rootSelectorOrNode
14723
- ? ['ng-version', '20.3.17']
14730
+ ? ['ng-version', '20.3.18']
14724
14731
  : // Extract attributes and classes from the first selector only to match VE behavior.
14725
14732
  extractAttrsAndClassesFromSelector(componentDef.selectors[0]);
14726
14733
  let creationBindings = null;
@@ -24917,7 +24924,7 @@ function i18nAttributesFirstPass(tView, index, values) {
24917
24924
  // the compiler treats static i18n attributes as regular attribute bindings.
24918
24925
  // Since this may not be the first i18n attribute on this element we need to pass in how
24919
24926
  // many previous bindings there have already been.
24920
- generateBindingUpdateOpCodes(updateOpCodes, message, previousElementIndex, attrName, countBindings(updateOpCodes), null);
24927
+ generateBindingUpdateOpCodes(updateOpCodes, message, previousElementIndex, attrName, countBindings(updateOpCodes), SENSITIVE_ATTRS[attrName.toLowerCase()] ? _sanitizeUrl : null);
24921
24928
  }
24922
24929
  }
24923
24930
  tView.data[index] = updateOpCodes;
@@ -25245,12 +25252,7 @@ function walkIcuTree(ast, tView, tIcu, lView, sharedUpdateOpCodes, create, remov
25245
25252
  const hasBinding = !!attr.value.match(BINDING_REGEXP);
25246
25253
  if (hasBinding) {
25247
25254
  if (VALID_ATTRS.hasOwnProperty(lowerAttrName)) {
25248
- if (URI_ATTRS[lowerAttrName]) {
25249
- generateBindingUpdateOpCodes(update, attr.value, newIndex, attr.name, 0, _sanitizeUrl);
25250
- }
25251
- else {
25252
- generateBindingUpdateOpCodes(update, attr.value, newIndex, attr.name, 0, null);
25253
- }
25255
+ generateBindingUpdateOpCodes(update, attr.value, newIndex, attr.name, 0, SENSITIVE_ATTRS[lowerAttrName] ? _sanitizeUrl : null);
25254
25256
  }
25255
25257
  else {
25256
25258
  ngDevMode &&
@@ -25260,7 +25262,7 @@ function walkIcuTree(ast, tView, tIcu, lView, sharedUpdateOpCodes, create, remov
25260
25262
  }
25261
25263
  }
25262
25264
  else if (VALID_ATTRS[lowerAttrName]) {
25263
- if (URI_ATTRS[lowerAttrName]) {
25265
+ if (SENSITIVE_ATTRS[lowerAttrName]) {
25264
25266
  // Don't sanitize, because no value is acceptable in sensitive attributes.
25265
25267
  // Translators are not allowed to create URIs.
25266
25268
  if (typeof ngDevMode !== 'undefined' && ngDevMode) {