@@ -1606,6 +1606,7 @@ function pushStyleImpl(
1606
1606
target . push ( startChunkForTag ( 'style' ) ) ;
1607
1607
1608
1608
let children = null ;
1609
+ let innerHTML = null ;
1609
1610
for ( const propKey in props ) {
1610
1611
if ( hasOwnProperty . call ( props , propKey ) ) {
1611
1612
const propValue = props [ propKey ] ;
@@ -1617,9 +1618,8 @@ function pushStyleImpl(
1617
1618
children = propValue ;
1618
1619
break ;
1619
1620
case 'dangerouslySetInnerHTML' :
1620
- throw new Error (
1621
- '`dangerouslySetInnerHTML` does not make sense on <title>.' ,
1622
- ) ;
1621
+ innerHTML = propValue ;
1622
+ break ;
1623
1623
default :
1624
1624
pushAttribute ( target , propKey , propValue ) ;
1625
1625
break ;
@@ -1642,6 +1642,7 @@ function pushStyleImpl(
1642
1642
// eslint-disable-next-line react-internal/safe-string-coercion
1643
1643
target . push ( stringToChunk ( escapeTextForBrowser ( '' + child ) ) ) ;
1644
1644
}
1645
+ pushInnerHTML ( target , innerHTML , children ) ;
1645
1646
target . push ( endTag1 , stringToChunk ( 'style' ) , endTag2 ) ;
1646
1647
return null ;
1647
1648
}
@@ -1782,6 +1783,7 @@ function pushTitleImpl(
1782
1783
target . push ( startChunkForTag ( 'title' ) ) ;
1783
1784
1784
1785
let children = null ;
1786
+ let innerHTML = null ;
1785
1787
for ( const propKey in props ) {
1786
1788
if ( hasOwnProperty . call ( props , propKey ) ) {
1787
1789
const propValue = props [ propKey ] ;
@@ -1793,9 +1795,8 @@ function pushTitleImpl(
1793
1795
children = propValue ;
1794
1796
break ;
1795
1797
case 'dangerouslySetInnerHTML ':
1796
- throw new Error (
1797
- '`dangerouslySetInnerHTML` does not make sense on <title>.' ,
1798
- ) ;
1798
+ innerHTML = propValue ;
1799
+ break ;
1799
1800
default :
1800
1801
pushAttribute ( target , propKey , propValue ) ;
1801
1802
break ;
@@ -1818,6 +1819,7 @@ function pushTitleImpl(
1818
1819
// eslint-disable-next-line react-internal/safe-string-coercion
1819
1820
target . push ( stringToChunk ( escapeTextForBrowser ( '' + child ) ) ) ;
1820
1821
}
1822
+ pushInnerHTML ( target , innerHTML , children ) ;
1821
1823
target . push ( endTag1 , stringToChunk ( 'title' ) , endTag2 ) ;
1822
1824
return null ;
1823
1825
}
0 commit comments