invalid XML tag syntax on jquery append
<p>Can you help me on this:</p>

<pre><code>class Custom_View_Helper_AddThis extends Zend_View_Helper_Abstract
{

    static $instances = 0;

    /**
     * @var Zend_View_Interface 
     */
    public $view;

    /**
     *  Return AddThis social sharin toolkit
     *  @param $url uri of page to share
     *  @param $title title of page
     *  @param $anews render social addthis at the end of the news
     *  @return void
     */
    public function addThis($url = null, $title = null, $anews = false) {
        $domain = 'http://' . $_SERVER['HTTP_HOST'] . '/';
        $link = $domain . $url;
        $html = &lt;&lt;&lt;EOT
        &lt;!-- AddThis Button BEGIN --&gt;
        &lt;div class="addthis_toolbox addthis_default_style" addthis:url="$link" addthis:title="$title"&gt;
        &lt;a class="addthis_button_linkedin_counter"&gt;&lt;/a&gt;
        &lt;/div&gt;
        &lt;!-- AddThis Button END --&gt;
EOT;
        $html2 = sprintf('
        &lt;div class="addthis_toolbox addthis_default_style" addthis:url="%s" addthis:title="%s"&gt;
        &lt;a class="vl addthis_button_google_plusone" g:plusone:size="tall"&gt;&lt;/a&gt;
        &lt;/div&gt;', $link, $title);

        $tracking = "
        var addthis_config = {
            data_ga_property: 'UA-XXXXXXXX-X',
            data_ga_social: true
        };" . PHP_EOL;

        $src = "//s7.addthis.com/js/250/addthis_widget.js#pubid=xa-4f94ba586f83fcc8";
        self::$instances += 1;
        $mscript = $this-&gt;view-&gt;HeadScript();
        if (self::$instances == 1) {
            $mscript-&gt;appendScript($tracking);
            if ($anews) {
                $mscript-&gt;appendScript('
                $(document).ready(function(){
                  $("#social_link").append('. $html2 .');
                });
                ');
            }
            $mscript-&gt;appendFile($src);
        }
        return $html;
    }

    /**
     * Sets the view field 
     * @param $view Zend_View_Interface
     */
    public function setView(Zend_View_Interface $view) {
        $this-&gt;view = $view;
    }
}
</code></pre>

<p>I want to create a view helper for a zend project which will generate social sharing plugins.</p>

<p>I get the first icons and links set properly, but the ones send to the jQuery function don't work and I got invalid XML tag syntax in firebug console. I tried over and over nothing I did seems to work.</p>

<p>Here the javascript generated</p>

<pre><code> $(document).ready(function(){
$("#social_link").html(
&lt;div class="addthis_toolbox addthis_default_style" addthis:url="http://ayaou//news/bonjour-ayaou" addthis:title="Bonjour Ayaou"&gt;
&lt;a class="vl addthis_button_tweet" tw:count="vertical"&gt;&lt;/a&gt;
&lt;a class="vl addthis_button_google_plusone" g:plusone:size="tall"&gt;&lt;/a&gt;
&lt;a class="addthis_button_facebook_like" fb:like:layout="button_count"
fb:like:action="recommend"&gt;&lt;/a&gt;
&lt;a class="addthis_button_facebook_send"&gt;&lt;/a&gt;
&lt;/div&gt;);
}); 
</code></pre>
