Reputation: 18614
I'm trying to set some text to jQuery UI Dialog.
When passing a text with Umlauts, it appears in the body as intended, but in the title as ü
.
$(document).ready(function() {
zeigeDialog("ü", "ü");
})
function zeigeDialog(title, message) {
$("#dialog").dialog({
modal: true,
title: title,
buttons: {
Ok: function() {
$(this).dialog('close');
}
}
});
$("#dialog_Text").html(message);
}
Upvotes: 1
Views: 332
Reputation: 41075
Just create a dummy element, set it's html using your title and retrieve the text. Then use that to set the title
...
title: $('<span></span>').html(title).text(),
...
Fiddle - https://jsfiddle.net/e7e07ajr/
Upvotes: 1