Issue in adding html tags to .append() jquery .xhtml
<p>I have the following script in xhtml. I am using prime faces 3.1.</p>

<pre><code>&lt;script&gt;            
        $(document).ready(function(){
             $("#form_Detail").submit(function(){
                    $('input[name$="vInputTxt1"]').each(function(){
                        if($(this).val()==""){
                            $("#errorMessages").append("v is required");
                            $("#errorMessages").append('&lt;br /&gt;');
                        }
                    });

                    $('input[name$="gcInputTxt"]').each(function(){
                        if($(this).val()==""){
                    Line A:     $("#errorMessages").append("gc  is required");
                        }
                    });
            });
        }); 
    &lt;script&gt;
</code></pre>

<p>Everything works fine till I include </p>

<pre><code>$("#errorMessages").append('&lt;br /&gt;');
</code></pre>

<p>After adding br tag,I get the error : Uncaught SyntaxError: Unexpected token ; on Line A.</p>

<p>Probably because the html which is getting generated is :</p>

<pre><code>$('input[name$="vInputTxt1"]').each(function(){
    if($(this).val()==""){
       $("#errorMessages").append("v  is required");
       $("#errorMessages").append('&lt;br /&gt;');
    }
});

                           $('input[name$=&amp;quot;gcInputTxt&amp;quot;]').each(function(){
    if($(this).val()==&amp;quot;&amp;quot;){
     $(&amp;quot;#errorMessages&amp;quot;).append(&amp;quot;gc  is required&amp;quot;);
    }
</code></pre>

<p>});</p>

<p>Please notice that evry <code>""</code> after br tag has got converted to <code>&amp;quot;</code></p>

<p>Being new to jquery &amp; xhtml, I am not able to understand the reason. I did read <a href="http://stackoverflow.com/questions/2173556/why-cant-i-add-a-br-with-jquery-html">Why can&#39;t I add a &lt;br /&gt; with JQuery .html?</a> &amp; <a href="http://stackoverflow.com/questions/7166628/creating-valid-xhtml-when-using-jquery-append">Creating valid XHTML when using jQuery .append()</a> , but couldn't identify the issue.</p>

<p>If I do not use, $("#errorMessages").append('<br />'); the html does gets appended to the div errorMessages.</p>

<p>Thanks,
Shikha</p>
