mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
refactor(core): simplify hydration annotation key (#52207)
This commit drops the `ɵ` symbol from hydration annotation key: `__ɵnghData__` -> `__nghData__`. This helps ensure that there are no UTF8 symbols that might be damaged in case a web server is misconfigured. Noticed while working on https://github.com/angular/angular/pull/52206. PR Close #52207
This commit is contained in:
parent
262d4d52b5
commit
4e4ad5ab2e
2 changed files with 2 additions and 2 deletions
|
|
@ -23,7 +23,7 @@ import {CONTAINERS, DehydratedView, DISCONNECTED_NODES, ELEMENT_CONTAINERS, MULT
|
|||
* The name of the key used in the TransferState collection,
|
||||
* where hydration information is located.
|
||||
*/
|
||||
const TRANSFER_STATE_TOKEN_ID = '__ɵnghData__';
|
||||
const TRANSFER_STATE_TOKEN_ID = '__nghData__';
|
||||
|
||||
/**
|
||||
* Lookup key used to reference DOM hydration data (ngh) in `TransferState`.
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ const TEXT_NODE_SEPARATOR_COMMENT = 'ngtns';
|
|||
const SKIP_HYDRATION_ATTR_NAME = 'ngSkipHydration';
|
||||
const SKIP_HYDRATION_ATTR_NAME_LOWER_CASE = SKIP_HYDRATION_ATTR_NAME.toLowerCase();
|
||||
|
||||
const TRANSFER_STATE_TOKEN_ID = '__ɵnghData__';
|
||||
const TRANSFER_STATE_TOKEN_ID = '__nghData__';
|
||||
|
||||
const NGH_ATTR_REGEXP = new RegExp(` ${NGH_ATTR_NAME}=".*?"`, 'g');
|
||||
const EMPTY_TEXT_NODE_REGEXP = new RegExp(`<!--${EMPTY_TEXT_NODE_COMMENT}-->`, 'g');
|
||||
|
|
|
|||
Loading…
Reference in a new issue