@@ -715,11 +715,13 @@ export const BModal = /*#__PURE__*/ Vue.extend({
715
715
[ this . normalizeSlot ( 'modal-header-close' , { } ) ]
716
716
)
717
717
}
718
+ const domProps =
719
+ ! this . hasNormalizedSlot ( 'modal-title' ) && this . titleHtml
720
+ ? { innerHTML : this . titleHtml }
721
+ : { }
718
722
modalHeader = [
719
- h ( this . titleTag , { class : [ 'modal-title' ] } , [
720
- this . normalizeSlot ( 'modal-title' , this . slotScope ) ||
721
- this . titleHtml ||
722
- stripTags ( this . title )
723
+ h ( this . titleTag , { class : [ 'modal-title' ] , domProps } , [
724
+ this . normalizeSlot ( 'modal-title' , this . slotScope ) || stripTags ( this . title )
723
725
] ) ,
724
726
closeButton
725
727
]
@@ -755,6 +757,7 @@ export const BModal = /*#__PURE__*/ Vue.extend({
755
757
if ( ! modalFooter ) {
756
758
let cancelButton = h ( false )
757
759
if ( ! this . okOnly ) {
760
+ const cancelHtml = this . cancelTitleHtml ? { innerHTML : this . cancelTitleHtml } : null
758
761
cancelButton = h (
759
762
BButton ,
760
763
{
@@ -767,11 +770,11 @@ export const BModal = /*#__PURE__*/ Vue.extend({
767
770
} ,
768
771
[
769
772
this . normalizeSlot ( 'modal-cancel' , { } ) ||
770
- this . cancelTitleHtml ||
771
- stripTags ( this . cancelTitle )
773
+ ( cancelHtml ? h ( 'span' , { domProps : cancelHtml } ) : stripTags ( this . cancelTitle ) )
772
774
]
773
775
)
774
776
}
777
+ const okHtml = this . okTitleHtml ? { innerHTML : this . okTitleHtml } : null
775
778
const okButton = h (
776
779
BButton ,
777
780
{
@@ -782,7 +785,10 @@ export const BModal = /*#__PURE__*/ Vue.extend({
782
785
} ,
783
786
on : { click : this . onOk }
784
787
} ,
785
- [ this . normalizeSlot ( 'modal-ok' , { } ) || this . okTitleHtml || stripTags ( this . okTitle ) ]
788
+ [
789
+ this . normalizeSlot ( 'modal-ok' , { } ) ||
790
+ ( okHtml ? h ( 'span' , { domProps : okHtml } ) : stripTags ( this . okTitle ) )
791
+ ]
786
792
)
787
793
modalFooter = [ cancelButton , okButton ]
788
794
}
0 commit comments