Support » Plugin: WP UI - Tabs, Accordions, Sliders » Accordion breaks on multiple title question marks

  • WP 3.5.1
    jQuery 1.9.0
    WP UI 0.8.7
    Chrome 27

    Uncaught Error: Syntax error, unrecognized expression: #tab1_and_tab2_tab3? (jquery.min.js:2)

    This is a pretty interesting error – it only seems to happen when there is more than one question mark present in the accordion tab title.

    WP Editor:

    [wptabs type="accordion" effect="fade" mode="horizontal"] [wptabtitle] tab1 and tab2? tab3?[/wptabtitle] [wptabcontent]We will arrange that for you.[/wptabcontent] [wptabtitle] Will you need the service of a Lawyer?[/wptabtitle] [wptabcontent]We will make that introduction.[/wptabcontent] [/wptabs]

    Output HTML:

    <div id="wp-accordion-1" class="wp-accordion wpui-light wpui-styles wpui-collapsible"> <div class="accordion"><h3 class="wp-tab-title"> tab1 and tab2? tab3?</h3><div class="wp-tab-content"><div class="wp-tab-content-wrapper">We will arrange that for you.</div></div><h3 class="wp-tab-title"> Will you need the service of a Lawyer?</h3><div class="wp-tab-content"><div class="wp-tab-content-wrapper">We will make that introduction.</div></div></div> <!-- end div.wp-tab-content -->&nbsp; <!-- end div.wp-tab-content -->&nbsp;</div>

    I don’t quite have enough time to troubleshoot at the moment – will check in later.

    http://wordpress.org/extend/plugins/wp-ui/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter Eric McNiece

    (@emcniece)

    Looks like it breaks on commas as well.

    I’m having the same issue with question marks. Has anyone identified a solution yet?

    Well, I think I’ve found a short term fix or work-around. Trying checking ” Use Old Scripts API.” under the Advanced settings and see if that fixes it. Looks like its a JS compatibility issue.

    Thread Starter Eric McNiece

    (@emcniece)

    Interesting. I wonder if the JS is parsing text as a JSON element or something else. If you get a chance, can you try escaping the question marks or commas with a slash? Something like this:

    `[wptabtitle] tab1 and tab2\? tab3\?[/wptabtitle]

    Tried escaping the ?s and it didn’t seem to make a difference. Guess I’ll stick with the old scripts API setting for now.

    I will likely open a new thread on this because my issue might not be the same, but just incase is it related I’m posting the symptom here also.

    Theme 2012, no plugins, wp 3.5.2

    The following fails to produce an accordion tab and can mess up other areas of the page:

    [wptabs type="accordion" effect="fade" mode="vertical" background="false"]
    
    [wptabtitle]After I place my print order, how long will it take to receive my prints?[/wptabtitle]
    
    [wptabcontent]Some content[/wptabcontent]
    
    [/wptabs]

    But if I just replace the “?” at the end of “prints?” with an “x” as shown below, everything seems to work as expected.

    [wptabs type="accordion" effect="fade" mode="vertical" background="false"]
    
    [wptabtitle]After I place my print order, how long will it take to receive my printsx[/wptabtitle]
    
    [wptabcontent]Some content[/wptabcontent]
    
    [/wptabs]
    Thread Starter Eric McNiece

    (@emcniece)

    Sounds about right. I didn’t try mixing commas and question marks myself, but I bet the result would be the same. Haha such a strange bug…

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Accordion breaks on multiple title question marks’ is closed to new replies.