• Resolved blackbird69

    (@blackbird69)


    Is there anyway to prevent WP editor to turn apostrophe (‘) in to quotation marks (“) ?
    If I type this for a page in the text editor:
    [private role="subscriber-only" alt="You need to be <a href='https://site.com/login.php'>logged in</a> to view this page!"]
    It will turn the ‘ in to ” if I switch to the visual editor – or if I just edit a page and save it, the ‘ will be converted to ” and the page is no longer protected. It’s very easy to forget to check for that every time editing a page. Anything you can do to prevent this from happening?

    • This topic was modified 6 years, 3 months ago by blackbird69.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Aldo Latino

    (@aldolat)

    Hello @blackbird69,
    I just tried this shortcode:

    [private role="subscriber-only" alt="You need to be <a href='https://site.com/login.php'>logged in</a> to view this page!"]Hidden text.[/private]

    and it works as expected. The text in the HTML source page is:

    <p class="private alt-text">You need to be <a href='https://site.com/login.php'>logged in</a> to view this page!</p>

    I’m using WordPress 5.0.1 and the Twenty Nineteen standard theme.

    Have you tried using one of the standard theme and disabling all plugins except Private Content? This is an effective way to find the problem.

    Let me know, please.

    Thread Starter blackbird69

    (@blackbird69)

    WP’s text editor has 2 tabs. Text and Visual. If you use the Text tab, there’s no problem. But as soon I switch to the Visual tab the ‘ becomes “. Doesn’t matter which theme I use or version of WP.

    In the Text tab it looks like this:
    [private role="subscriber-only" alt="You need to be <a href='https://site.com/login.php'>logged in</a> to view this page!"]Hidden text.[/private]

    Then switching to Visual tab and back to Text tab again:
    [private role="subscriber-only" alt="You need to be <a href="https://site.com/login.php">logged in</a> to view this page!"]Hidden text.[/private]

    Something happens when you enter the Visual tab from the Text tab and that changes the code.

    Plugin Author Aldo Latino

    (@aldolat)

    Are you using WordPress 5 with Gutenberg active?

    Plugin Author Aldo Latino

    (@aldolat)

    I just made a test with the classic editor and I confirm your post: when switching from “Text” to “Visual”, the ' is converted into ". This is a standard WordPress behavior.

    Instead, using Gutenberg, this doesn’t happen if the shortcode is inserted using the “Shortcode” block.

    Please, let me know.

    Thread Starter blackbird69

    (@blackbird69)

    Yes, Gutenberg works if you use the blocks. But I don’t use Gutenberg.

    But you answered my question – that the old editor will change the code when switching tabs and that is normal behavior.

    Thanks.

    • This reply was modified 6 years, 3 months ago by blackbird69.
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Apostrophe turns into quotation marks’ is closed to new replies.