MWDelaney / bootstrap-3-shortcodes

WordPress shortcodes for easier use of Bootstrap elements in your content.
https://wordpress.org/plugins/bootstrap-3-shortcodes/
MIT License
377 stars 118 forks source link

Collapse not working, error in code #134

Closed maguijo closed 8 years ago

maguijo commented 8 years ago

Hi guys, The collapse code has an error in it, causing it to not collapse or uncollapse. The code outputs this:

    <div class="panel panel-default">
        <div class="panel-heading">
          <h4 class="panel-title">
            <a href="#single-collapse-0" "="" data-parent="#single-collapse" data-toggle="collapse" class="collapsed">Collapse 1</a>
          </h4>
        </div>
        <div class="panel-collapse collapse" id="single-collapse-0">
          <div class="panel-body">
              <p>.My content</p>
          </div>
        </div>
    </div>

The error is in the a tag within the panel-title. There's a "-"" that is causing it to break. I looked at the plugin files but I'm not really sure how to fix this. Line 1367 in bootstrap-shortcodes.php appears to be the line that causes the error. Particularly the double quote marks just after data-parent="#' . $parent . '""' But taking out one of those quotes cleans up the html code output, but the collapse still doesn't work right. So I'm stumped. Must be something I'm not understanding. Please advise, thanks!

MWDelaney commented 8 years ago

Hi, thanks for reporting this. I believe this issue is fixed in the latest version here on GitHub, which hasn't made it to WordPress.org yet. Would you mind downloading the latest zip file from here and trying that on your site?

Thanks!

maguijo commented 8 years ago

Yes it is fixed there. Thanks!

MWDelaney commented 8 years ago

More reason to publish the damn update to WordPress.org. Thanks for the report. I'll get the update out soon!