File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
packages/react-dom/src/server Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import {
14
14
convertStringToBuffer ,
15
15
} from 'react-server/src/ReactServerStreamConfig' ;
16
16
17
+ import escapeTextForBrowser from './escapeTextForBrowser' ;
17
18
import invariant from 'shared/invariant' ;
18
19
19
20
// Per response,
@@ -46,13 +47,11 @@ export function createSuspenseBoundaryID(
46
47
}
47
48
48
49
function encodeHTMLIDAttribute ( value : string ) : string {
49
- // TODO: This needs to be encoded for security purposes.
50
- return value ;
50
+ return escapeTextForBrowser ( value ) ;
51
51
}
52
52
53
53
function encodeHTMLTextNode ( text : string ) : string {
54
- // TOOD: This needs to be encoded for security purposes.
55
- return text ;
54
+ return escapeTextForBrowser ( text ) ;
56
55
}
57
56
58
57
export function pushTextInstance (
You can’t perform that action at this time.
0 commit comments