• Resolved andrekelling

    (@andrekelling)


    Hi,

    first thank you for this wonderful plugin which makes life lot easier.

    until i spotted the following behaviour ??

    It could be a misbehaviour in the plugin, maybe some char utf8-ish configuration issue, some security issue thingy or misunderstatement from me.

    so when duplicating a post which contains the ampersand character & in post_title, then in the duplicated post the ampersand character is encoded.
    e.g.:
    original post title “cool & the gang”
    duplicate post title “cool & the gang”
    which for me, is not a super exact duplicate.

    this is caused by the usage of wp_kses_post .
    in this line: https://plugins.trac.www.ads-software.com/browser/post-duplicator/tags/2.32/includes/ajax.php#L20

    found some similar issue on another topic of WordPress here: https://github.com/WordPress/gutenberg/issues/20490

    —-

    Plugin Version: Version 2.32
    WordPress Version 6.4.3

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author metaphorcreations

    (@metaphorcreations)

    @andrekelling thanks for creating a ticket. I am not able to replicate this issue in my testing, so there may be something else happening on your site. If you can, please run through the following article to see if something in another plugin or your theme may be affecting this functionality: https://www.metaphorcreations.com/article/general/plugins/test-plugin-conflicts/

    Let me know what you find out. Thanks!

    Thread Starter andrekelling

    (@andrekelling)

    Ah yes,

    This is just visible in the classic editor.
    But it still happens in the database that instead of a plain & char, a char & is saved there in the post_title.
    Can you confirm that?

    So imagine you got a custom post type without the setting 'show_in_rest' => true will work in WordPress with the classic editor. This is what i got here.
    If a Gutenberg editor is active, it displays the encoded ampersand as one plain ampersand char. So it might stays unnoticed.

    Plugin Author metaphorcreations

    (@metaphorcreations)

    Ok, thanks for the follow up! I will look into this over the weekend and run some test.

    Plugin Author metaphorcreations

    (@metaphorcreations)

    I just posted an update that should resolve this issue for you. Let me know if you run into anything else.

    Thread Starter andrekelling

    (@andrekelling)

    just great! resolves it not just for me, i’d say.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Ampersand char in title encoded for duplicate’ is closed to new replies.