Is there some specific reason why collapse-o-matic outputs SPAN tags instead of DIVs? I’m pretty sure span tags are not meant to be block-level elements. They’re supposed to appear inside of paragraphs. Because of this, wpautop will attempt to wrap them if you run it after the shortcode.
Default WP behavior is for wpautop to run before shortcodes, however the default behavior creates known bugs with nested shortcodes and perhaps other shortcode situations. As a result a lot of people move wpautop to run after their shortcodes. They change priority to 99. This results in <span> tags getting wrapped.
Wouldn’t it be better to just use DIVs to improve reliability?
No specific reason, other than the initial use of the plugin used span tags. You make a good point, and we will consider changing the default tag. In the mean time, span tags can be replaced by div tags by:
1. adding the tag=”div” attribute for single elements
2. setting page options default tag attributet to div
Thank you for the informed and well thought out post.