From df3ae46f631c23147396dde902d77841cc54915f Mon Sep 17 00:00:00 2001 From: Shu Ding Date: Sun, 24 Oct 2021 05:21:55 +0200 Subject: [PATCH] fix passing strings as chunks (#22617) --- .../src/server/ReactDOMServerFormatConfig.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/react-dom/src/server/ReactDOMServerFormatConfig.js b/packages/react-dom/src/server/ReactDOMServerFormatConfig.js index 1f5a7a65bed59..2012392004e52 100644 --- a/packages/react-dom/src/server/ReactDOMServerFormatConfig.js +++ b/packages/react-dom/src/server/ReactDOMServerFormatConfig.js @@ -471,7 +471,7 @@ function pushAttribute( attributeSeparator, attributeNameChunk, attributeAssign, - escapeTextForBrowser(value), + stringToChunk(escapeTextForBrowser(value)), attributeEnd, ); } @@ -482,7 +482,7 @@ function pushAttribute( attributeSeparator, attributeNameChunk, attributeAssign, - escapeTextForBrowser(value), + stringToChunk(escapeTextForBrowser(value)), attributeEnd, ); } @@ -493,7 +493,7 @@ function pushAttribute( attributeSeparator, attributeNameChunk, attributeAssign, - escapeTextForBrowser(value), + stringToChunk(escapeTextForBrowser(value)), attributeEnd, ); } @@ -510,7 +510,7 @@ function pushAttribute( attributeSeparator, attributeNameChunk, attributeAssign, - escapeTextForBrowser(value), + stringToChunk(escapeTextForBrowser(value)), attributeEnd, ); } @@ -532,7 +532,7 @@ function pushAttribute( attributeSeparator, stringToChunk(name), attributeAssign, - escapeTextForBrowser(value), + stringToChunk(escapeTextForBrowser(value)), attributeEnd, ); } @@ -1146,7 +1146,7 @@ function pushStartCustomElement( attributeSeparator, stringToChunk(propKey), attributeAssign, - escapeTextForBrowser(propValue), + stringToChunk(escapeTextForBrowser(propValue)), attributeEnd, ); }