mirror of
https://github.com/hanzoai/react.git
synced 2026-09-24 17:02:27 +00:00
[Fizz] Move DOM/Native format configs to their respective packages (#20994)
* Move DOM/Native format configs to their respective packages The streaming configs (Node/Browser) are different because they operate at another dimension that exists in each package. * Use escapeTextForBrowser to encode dynamic strings We can now use local dependencies
This commit is contained in:
committed by
GitHub
parent
a3d71ea21b
commit
4fddd405be
+3
-4
@@ -14,6 +14,7 @@ import {
|
||||
convertStringToBuffer,
|
||||
} from 'react-server/src/ReactServerStreamConfig';
|
||||
|
||||
import escapeTextForBrowser from './escapeTextForBrowser';
|
||||
import invariant from 'shared/invariant';
|
||||
|
||||
// Per response,
|
||||
@@ -46,13 +47,11 @@ export function createSuspenseBoundaryID(
|
||||
}
|
||||
|
||||
function encodeHTMLIDAttribute(value: string): string {
|
||||
// TODO: This needs to be encoded for security purposes.
|
||||
return value;
|
||||
return escapeTextForBrowser(value);
|
||||
}
|
||||
|
||||
function encodeHTMLTextNode(text: string): string {
|
||||
// TOOD: This needs to be encoded for security purposes.
|
||||
return text;
|
||||
return escapeTextForBrowser(text);
|
||||
}
|
||||
|
||||
export function pushTextInstance(
|
||||
@@ -7,4 +7,4 @@
|
||||
* @flow
|
||||
*/
|
||||
|
||||
export * from '../ReactDOMServerFormatConfig';
|
||||
export * from 'react-dom/src/server/ReactDOMServerFormatConfig';
|
||||
|
||||
@@ -7,4 +7,4 @@
|
||||
* @flow
|
||||
*/
|
||||
|
||||
export * from '../ReactDOMServerFormatConfig';
|
||||
export * from 'react-dom/src/server/ReactDOMServerFormatConfig';
|
||||
|
||||
@@ -7,4 +7,4 @@
|
||||
* @flow
|
||||
*/
|
||||
|
||||
export * from '../ReactDOMServerFormatConfig';
|
||||
export * from 'react-dom/src/server/ReactDOMServerFormatConfig';
|
||||
|
||||
@@ -7,4 +7,4 @@
|
||||
* @flow
|
||||
*/
|
||||
|
||||
export * from '../ReactNativeServerFormatConfig';
|
||||
export * from 'react-native-renderer/src/server/ReactNativeServerFormatConfig';
|
||||
|
||||
Reference in New Issue
Block a user