File tree Expand file tree Collapse file tree
packages/react-dom/src/server Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,7 +71,12 @@ export function createMarkupForCustomAttribute(
7171 name : string ,
7272 value : mixed ,
7373) : string {
74- if ( ! isAttributeNameSafe ( name ) || value == null ) {
74+ if (
75+ ! isAttributeNameSafe ( name ) ||
76+ value == null ||
77+ typeof value === 'function' ||
78+ typeof value === 'symbol'
79+ ) {
7580 return '' ;
7681 }
7782 return name + '=' + quoteAttributeValueForBrowser ( value ) ;
Original file line number Diff line number Diff line change @@ -1070,7 +1070,11 @@ function pushStartCustomElement(
10701070 // Ignored. These are built-in to React on the client.
10711071 break ;
10721072 default :
1073- if ( isAttributeNameSafe ( propKey ) ) {
1073+ if (
1074+ isAttributeNameSafe ( propKey ) &&
1075+ typeof propValue !== 'function' &&
1076+ typeof propValue !== 'symbol'
1077+ ) {
10741078 target . push (
10751079 attributeSeparator ,
10761080 stringToChunk ( propKey ) ,
You can’t perform that action at this time.
0 commit comments