I was looking at the way the Juicebox javascript library nests its markup and have noticed that it always places captions inside <p> tags. What this means is that captions should really only contain inline tag elements in order for the markup to be valid. The trick is that most users who choose to include markup in their titles and captions will also be passing their text through a Drupal text format (or maybe a WYSIWYG tool) that tries to add block-level formatting silently by default. The result is that this module will be passing lots of values to the Juicebox javascript library that contain <p> tags, and possibly other markup, that will be contextually invalid upon final display. Most browsers will deal with this just fine, so it's not a critical issue, but it's still invalid markup.
It would be totally possible to avoid this by forcing users to adjust the filters used on their text formats, but that may not be very practical. No one wants to create custom text formats for each module they use and this issue isn't related to the main purpose of those text formats anyway (sanitizing user input). So I'm thinking it should probably be up to this module to enforce its own filter, after getting sanitized title/caption markup from Drupal, that further strips block-level tags from captions and titles.
Comments
Comment #0.0
rjacobs commentedbetter clarify text formats
Comment #1
rjacobs commentedI added a filter to remove block-level tags in this commit:
http://drupalcode.org/project/juicebox.git/commit/ca82684
This filter can be also switched off if needed some edge-case where special tags must be maintained, but for the vast majority of cases it will provide much cleaner output for titles and captions.
This commit also improves some of the interface messages, etc.
Comment #2.0
(not verified) commentedclarify wording