WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: AddThis] Missing line break in JS skips first parameter (2 posts)

  1. tristanleboss
    Member
    Posted 4 years ago #

    Hello,

    I downloaded the plugin and installed it (v1.6.3). Then, I choose 'toolbox' as 'Menu type', typed my username and password and selected 'French' as 'Language'.

    But the language was not working. Searching in the source code of the webpage, I noticed the JS looked like :

    <script type="text/javascript">
    //<!--var addthis_language = 'fr';
    //-->
    </script>

    => The first line was treated as a comment by IE8 under Windows Server 2008 (at least).

    I add to correct line #323 of 'addthis_social_widget.php' plugin file to have the language working:
    $content .= "\n<!-- AddThis Button BEGIN -->\n".'<script type="text/javascript">'."\n//<!--";
    became:
    $content .= "\n<!-- AddThis Button BEGIN -->\n".'<script type="text/javascript">'."\n//<!--\n";

    Now, the JS is ok and the language works:

    <script type="text/javascript">
    //<!--
    var addthis_language = 'fr';
    //-->
    </script>

    Tristan

    http://wordpress.org/extend/plugins/addthis/

  2. _mjk_
    AddThis Samurai
    Posted 4 years ago #

    Thanks for the report -- we just fixed this in 1.6.4.

    Sorry for the inconvenience!
    Matt

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags