File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -348,3 +348,7 @@ export {
348348 vModelSelectInit ,
349349 vModelSetSelected ,
350350} from './directives/vModel'
351+ /**
352+ * @internal
353+ */
354+ export { unsafeToTrustedHTML } from './nodeOps'
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import {
1414 mergeProps ,
1515 patchStyle ,
1616 shouldSetAsProp ,
17+ unsafeToTrustedHTML ,
1718 warn ,
1819} from '@vue/runtime-dom'
1920import {
@@ -197,7 +198,7 @@ export function setElementText(
197198}
198199
199200export function setHtml ( el : TargetElement , value : any ) : void {
200- value = value == null ? '' : value
201+ value = value == null ? '' : unsafeToTrustedHTML ( value )
201202 if ( el . $html !== value ) {
202203 el . innerHTML = el . $html = value
203204 }
You can’t perform that action at this time.
0 commit comments