WordPress.org

Forums

Collapsing Categories
Error in generated jQuery: Unexpected token ILLEGAL in "collapsItems"-instance (1 post)

  1. qbahamutp
    Member
    Posted 2 years ago #

    Categories shown in widget are unable to toggle expand/collapse because of an error in the generated javascript. Might have something to do with the use of the deprecated wp_specialchars, but replacing this with the recommended "esc_html" didn't work either.

    Chrome's console returns this error:

    Uncaught SyntaxError: Unexpected token ILLEGAL

    Which refers to the first set of
    <li>-elements and their "collapsability":

    collapsItems['collapsCat-40:2'] = '<li class=\'collapsing categories item\'><a href=\'http://caesar-consult.nl/?cat=61\' title=\"Hieronder vindt u enkele <span style="color: #8b4513;">voorbeeldprojecten</span> die Caesar Consult de afgelopen jaren heeft uitgevoerd voor bedrijven in de sector <span style="color: #8b4513;">afvalverwerking en -verbranding</span>.
    
    Bekijk ook onze opdrachtgevers van de afgelopen jaren
    <h3 style="font-size: medium;"><span style="color: #8b4513;">Geen bedrijf is hetzelfde, neem contact met ons op voor een passende oplossing voor uw situatie!</span></h3>
    Blijf op de hoogte en meld je aan voor onze nieuwsbrief\">Afvalverwerking en -verbranding</a>         </li> <!-- ending subcategory --><li class=\'collapsing categories item\'><a href=\'http://caesar-consult.nl/?cat=62\' title=\"View all posts filed under Verwerking autobanden\">Verwerking autobanden</a>         </li> <!-- ending subcategory -->';

    Uncaught SyntaxError: Unexpected token ILLEGAL

    So yeah, the problem is bound to be the wrongful escaping of the html... Any idea's on how to fix this? I'd like to keep this plugin, but...
    http://wordpress.org/extend/plugins/collapsing-categories/

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Collapsing Categories
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic