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 {
348
348
vModelSelectInit ,
349
349
vModelSetSelected ,
350
350
} 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 {
14
14
mergeProps ,
15
15
patchStyle ,
16
16
shouldSetAsProp ,
17
+ unsafeToTrustedHTML ,
17
18
warn ,
18
19
} from '@vue/runtime-dom'
19
20
import {
@@ -197,7 +198,7 @@ export function setElementText(
197
198
}
198
199
199
200
export function setHtml ( el : TargetElement , value : any ) : void {
200
- value = value == null ? '' : value
201
+ value = value == null ? '' : unsafeToTrustedHTML ( value )
201
202
if ( el . $html !== value ) {
202
203
el . innerHTML = el . $html = value
203
204
}
You can’t perform that action at this time.
0 commit comments