これが古いことは知っていますが、目前の問題にヒットし、最終的には単純になり、今日私に起こっていました。
.html() の代わりに .text() を使用して、書式設定されたテキストの文字列をダイアログ div に追加していました 間違った方法:
$( "#dialog-message-div" ).text(str);
これにより、すべての HTML 文字がエスケープされました...書式設定が削除されましたが、技術者ではないユーザーに「技術的な」ものを表示する...HTML!
正しい方法: .text() を .html() に変更するだけで、魅力的に機能します。
$( "#dialog-message-div" ).html(str);
ダウンロードにバンドルされている jQueryUI の例 index.html から取得。
<html lang="us">
<head>
   <meta charset="utf-8">
   <title>jQuery UI Example Page</title>
   <link href="css/redmond/jquery-ui-1.10.3.custom.css" rel="stylesheet">
   <script src="js/jquery-1.9.1.js"></script>
   <script src="js/jquery-ui-1.10.3.custom.js"></script>
   <script>
   $(function() {      
      $( "#dialog" ).dialog({
         autoOpen: false,
         width: 400,
         resizable: false,
         buttons: [
            {
               text: "Ok",
               click: function() {
                  $( this ).dialog( "close" );
               }
            },
            {
               text: "Cancel",
               click: function() {
                  $( this ).dialog( "close" );
               }
            }
         ]
      });
      // Link to open the dialog
      $( "#dialog-link" ).click(function( event ) {
         $( "#dialog" ).dialog( "open" );
         var str = "<p>Lorem ipsum dolor sit amet, <b>consectetur adipisicing elit</b>, sed do eiusmod <i>tempor</i><br /><br /><br />incididunt ut labore et dolore magna aliqua. <br />Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>";
         event.preventDefault();
         //wrong way
         //$( "#dialog" ).text(str);
         $( "#dialog" ).html(str);
      });
   });
      </script>
</head>
<body>
<button id="dialog-link">Dialog Button</button>
<div id="dialog" title="Dialog Title">
</div>
</body>
</html>