Support » Plugin: Collapse-O-Matic » double quotes added to img tag inside expand title when switching to Visual

  • We are using the plugin to have images be the expand trigger. For example, on a biography page, the person’s picture is the trigger. We are using the format [expand title="<img class='bio-pic' src='image.jpg' />" rel="-highlander"]

    The above works great when this is added to Text view. However, once we switch to Visual view, double-quotes are replacing the single quotes in the image tag attributes. This therefore doesn’t display the image since the plugin requires you use single quotes inside the expand code.

    We have used just about all of the plugins to keep the ‘raw’ html out there that still allow the plugin shortcode to work, but while they work for not messing up any other html content, they do not prevent this issue with the quotes.

    Does anyone have any suggestions on how we can prevent this from happning, aside from disabling the Visual editor?
    Thank you!

Viewing 5 replies - 1 through 5 (of 5 total)
  • You mention the shortcode was first added to the Text Editor. Have you tried adding it first to the Visual Editor? If not, this may do the trick.

    Thanks for the response. I can add the shortcode in the Visual Editor, however where the problem occurs is when I want to add an image as the trigger in the title attribute of the shortcode. If i do this in the Visual Editor, wordpress automatically puts double-quotes around any attributes within the img tag (class and src as shown in my example). Those double quotes cause the image to not show up when the page is published. So to fix it, I go to Text Editor and make them single quotes, which works until you switch back to Visual, where double quotes are automatically replaced again.

    Anyone have any ideas on this? Still have not been able to figure it out. Just to recap: it ONLY works when using it in the Text editor, when switching back to Visual, WordPress instantly adds double-quotes around the src attributes which breaks the images. Thanks!

    I am having the exact same issue. Have you found a way around it criticnic?

    Hi time-space,
    I never was able to figure it out with Collapse-o-matic. I ended up just using the jQuery Accordion function, adding the code into my theme’s header. Quite a workaround but it works for we wanted to do 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘double quotes added to img tag inside expand title when switching to Visual’ is closed to new replies.