• Resolved luludak

    (@luludak)


    In version 5.7.2, the   character added in titles to prevent last word being a widow, is also added to the REST API, therefore sending the title along with the   when called. This was not happening in version 5.7.1.

    • This topic was modified 4 years ago by luludak.
    • This topic was modified 4 years ago by luludak.
Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author pepe

    (@pputzer)

    Hi @luludak, which REST API route do you mean specifically? The dewidow setting was non-functional since wp-Typography 5.1.0, so as a quick workaround, you can simply disable it in the settings for now.

    Plugin Author pepe

    (@pputzer)

    Hi @luludak, do you still need help with that issue?

    Thread Starter luludak

    (@luludak)

    This seems to do the job, thank you @pputzer . Is there a chance that dewidow setting will be restored in the future?

    Plugin Author pepe

    (@pputzer)

    @luludak, the dewidow setting is now working as intended. To look further into this, I need to know which REST API route is showing the erroneous behavior.

    Thread Starter luludak

    (@luludak)

    @pputzer thank you for your time. This one is used via setting custom REST routes, using rest_api_init action, utilizing the get_the_title(ID) call for retrieving post data, bringing title with the &nbsp included.

    Plugin Author pepe

    (@pputzer)

    Sorry for the delay, @luludak. Can you post an example of the value you get (as opposed to the value you’d expect)? get_the_title returns the filtered value, possibly including injected HTML. If you want just the plain text, the_title_attribute would strip any injected tags (though entities like the   would still be included.

    Would you expect the raw database value? Or do you think that titles shouldn’t have have dewidow applied in the first place? Or just not in the REST API? (The last one is tricky to get right, as the fields are supposed to be “formatted” by most routes.)

    Plugin Author pepe

    (@pputzer)

    Hi @luludak, is this still an issue for you?

    Thread Starter luludak

    (@luludak)

    @pputzer thank you for your support. We have come to an a more generic solution on this in addition to updating to latest version of wp-Typography, handling   explicitly within requests. Let’s resolve the issue.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Widow non-breaking space? falsely added to title in REST API’ is closed to new replies.