Quotes in Titles

Hello,

WP replaces quotes (" or &quot) in Titles and Content by default to a typographic quote, eg ″ (double right quote). This can be disabled for titles using remove_filter(“the_title”, “wptexturize”);

My case:
i have a string like eg <Testword "> (ending in a straight double quote) and use that in an X accordion as title, then X replaces that quote by `` (that are TWO single left quotes).

Testword " becomes Testword ``

So i try th HTML entity <Testword "> which totally crashes the interpreter.

My Question: What do i need to do to have proper quotes in eg accordions titles? Of course i truly need them, because the straight quotes are used as inch measurement, eg <2 inch disk> equals 2 " disk.

And yes, i know why you are masking them, but i need to have a correct solution…

Marc

Hi @mcian,

Thanks for reaching out.

The HTML entities seem to work on my installation, it shouldn’t crash it. Example,

&ldquo; Accordion Item 1&rdquo;

Is that what you’re trying to achieve?

Thanks!

Hi Rad,

no, i would like to have &quot; See screenshhots, yours work, mine crashes

OK:

NOK:

Im trying to get the headline in a shortcode: function shortcode_accordion_tab($atts, $content) and the array ($atts) gets mangled:

(
    [0] => headline="Kioskdrucker
    [1] => 2``
)

…not even masking it helps: Kioskdrucker 2\" still yields two single left quotes in front end

Mark close, it was a bug in Page builder, not X. For anyone stumbling upon this: it’s function prepareAtts() from shortcodes.php which does the bad encoding. Thanks WPB, you did it again.

Edit: + 3 more in admin/frontend and other javascript post processings scripts… unbelievable bad coding style…

Glad to know it works now!

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.