JS Replace fuction is not working as expected
<p>I have a backend CGI script that returns me below text in case of issues via an AJAX call:</p>

<pre><code>&lt;p&gt;A problem occurred in a Python script.
&lt;p&gt; /bin/cgi-bin/LOGS/tmpslM4pu.txt contains the description of this error.
</code></pre>

<p>I am trying to display it like below:</p>

<pre><code>$.ajax({
            type: "POST",
            url:  "runcgi.py",
            data:
            {
               'my_data' : 'test'
            },
            success: function(html)
            {
              if(..test for success..)
              {
              }
              else
              {
                            var StrippedString = $(html).toString().replace(/(&lt;([^&gt;]+)&gt;)/ig,"");                                                                                           var StrippedString = $(html).toString().replace(/(&lt;([^&gt;]+)&gt;)/ig,"");
                            $("p").html(StrippedString);

              }
});
</code></pre>

<p>And below is my HTML code:</p>

<pre><code>&lt;body&gt;
        &lt;p&gt;&lt;/p&gt;
&lt;/body&gt;
</code></pre>

<p>But I see the below output in my browser:</p>

<pre><code>[object Object]
</code></pre>

<p>How can I solve this?</p>
