Skip to content

Commit 162d940

Browse files
crisbetopkozlowski-opensource
authored andcommitted
refactor(platform-browser): clean up legacy way of getting a relative path (#53097)
Currently the way we extract the pathname of a URL is by creating an anchor node, assigning the URL to its `href` and reading the `pathname`. This is inefficient and it triggers an internal security check that doesn't allow the `href` attribute to be set which ends up blocking angular/components#28155. These changes switch to using the browser's built-in URL parsing instead. PR Close #53097
1 parent 6e1bf29 commit 162d940

File tree

12 files changed

+4
-40
lines changed

12 files changed

+4
-40
lines changed

packages/core/test/bundling/animations-standalone/bundle.golden_symbols.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1454,9 +1454,6 @@
14541454
{
14551455
"name": "updateMicroTaskStatus"
14561456
},
1457-
{
1458-
"name": "urlParsingNode"
1459-
},
14601457
{
14611458
"name": "viewAttachedToChangeDetector"
14621459
},

packages/core/test/bundling/animations/bundle.golden_symbols.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1526,9 +1526,6 @@
15261526
{
15271527
"name": "updateMicroTaskStatus"
15281528
},
1529-
{
1530-
"name": "urlParsingNode"
1531-
},
15321529
{
15331530
"name": "viewAttachedToChangeDetector"
15341531
},

packages/core/test/bundling/cyclic_import/bundle.golden_symbols.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1220,9 +1220,6 @@
12201220
{
12211221
"name": "updateMicroTaskStatus"
12221222
},
1223-
{
1224-
"name": "urlParsingNode"
1225-
},
12261223
{
12271224
"name": "viewAttachedToChangeDetector"
12281225
},

packages/core/test/bundling/defer/bundle.golden_symbols.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2384,9 +2384,6 @@
23842384
{
23852385
"name": "updateMicroTaskStatus"
23862386
},
2387-
{
2388-
"name": "urlParsingNode"
2389-
},
23902387
{
23912388
"name": "viewAttachedToChangeDetector"
23922389
},

packages/core/test/bundling/forms_reactive/bundle.golden_symbols.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1709,9 +1709,6 @@
17091709
{
17101710
"name": "updateMicroTaskStatus"
17111711
},
1712-
{
1713-
"name": "urlParsingNode"
1714-
},
17151712
{
17161713
"name": "viewAttachedToChangeDetector"
17171714
},

packages/core/test/bundling/forms_template_driven/bundle.golden_symbols.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1685,9 +1685,6 @@
16851685
{
16861686
"name": "updateMicroTaskStatus"
16871687
},
1688-
{
1689-
"name": "urlParsingNode"
1690-
},
16911688
{
16921689
"name": "viewAttachedToChangeDetector"
16931690
},

packages/core/test/bundling/hello_world/bundle.golden_symbols.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -971,9 +971,6 @@
971971
{
972972
"name": "updateMicroTaskStatus"
973973
},
974-
{
975-
"name": "urlParsingNode"
976-
},
977974
{
978975
"name": "viewAttachedToChangeDetector"
979976
},

packages/core/test/bundling/hydration/bundle.golden_symbols.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1331,9 +1331,6 @@
13311331
{
13321332
"name": "updateMicroTaskStatus"
13331333
},
1334-
{
1335-
"name": "urlParsingNode"
1336-
},
13371334
{
13381335
"name": "viewAttachedToChangeDetector"
13391336
},

packages/core/test/bundling/router/bundle.golden_symbols.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2081,9 +2081,6 @@
20812081
{
20822082
"name": "updateSegmentGroupChildren"
20832083
},
2084-
{
2085-
"name": "urlParsingNode"
2086-
},
20872084
{
20882085
"name": "viewAttachedToChangeDetector"
20892086
},

packages/core/test/bundling/standalone_bootstrap/bundle.golden_symbols.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,9 +1073,6 @@
10731073
{
10741074
"name": "updateMicroTaskStatus"
10751075
},
1076-
{
1077-
"name": "urlParsingNode"
1078-
},
10791076
{
10801077
"name": "viewAttachedToChangeDetector"
10811078
},

0 commit comments

Comments
 (0)