Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
convertStringToBuffer,
} from 'react-server/src/ReactServerStreamConfig';

import escapeTextForBrowser from './escapeTextForBrowser';
import invariant from 'shared/invariant';

// Per response,
Expand Down Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
* @flow
*/

export * from '../ReactDOMServerFormatConfig';
export * from 'react-dom/src/server/ReactDOMServerFormatConfig';
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
* @flow
*/

export * from '../ReactDOMServerFormatConfig';
export * from 'react-dom/src/server/ReactDOMServerFormatConfig';
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
* @flow
*/

export * from '../ReactDOMServerFormatConfig';
export * from 'react-dom/src/server/ReactDOMServerFormatConfig';
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
* @flow
*/

export * from '../ReactNativeServerFormatConfig';
export * from 'react-native-renderer/src/server/ReactNativeServerFormatConfig';