• Resolved Bri

    (@tinnyfusion)


    Hello, Firstly I would like to say thank you for such a great plugin!

    Now on to an issue that I have discovered. When a visitor tries to print an article that contains code (displayed via your plugin) it does not print all the code but instead only renders what can be seen on-site.

    Is there a way to have it include all the code for the print only version?

    To duplicate this issue, visit my site, scroll to the bottom and where the share icons are you can click on the Print button or simply select Print from your browser. Now look at the code section in the print preview.

    Hope there is a solution to this other than being told to display all the code in the article as this would make for a massively unreadable article causing the reader to have to scroll past every bit of code before continuing on.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 31 through 37 (of 37 total)
  • Thread Starter Bri

    (@tinnyfusion)

    Another potential issue I have just noticed while pasting in some code for another article on my site. It seems that & is being replaced with &.

    For example, I have a line that looks like this:

    $linkedInURL = esc_url('https://www.linkedin.com/shareArticle?mini=true&url=' . $ctm_URL . '&title=' . $ctm_Title);

    but it is being replaced with this:

    $linkedInURL = esc_url('https://www.linkedin.com/shareArticle?mini=true&url=' . $ctm_URL . '&title=' . $ctm_Title);

    Honestly, I am not sure if it did this I updated to the latest version but this could cause an issue when the code is copied, pasted, and eventually executed.

    Plugin Author Kevin Batdorf

    (@kbat82)

    There’s a setting under advanced where you can toggle allowing those. Let me know if that doesn’t work.

    Thread Starter Bri

    (@tinnyfusion)

    That’s odd as it previously displayed these things just fine before the update to the latest version and that setting was enabled.. Also seems the tab size has returned to it’s default settings of 2 too.

    Thread Starter Bri

    (@tinnyfusion)

    If I change these settings to suit while editing a post do they then become the new defaults for the plugin every time I use it no matter if it is a new post or not?

    Thread Starter Bri

    (@tinnyfusion)

    I also assume none of the code entered is supposed to actually run given the nature of the plugin. It’s just I have a WordPress shortcode set up using the following:

    // Add [sharelinks] shortcode to display Social sharing buttons
    add_shortcode('sharelinks', 'ctm_social_sharing_buttons');

    Now, within the code there is a commented out part detailing said short code but when the article is saved it executes the shortcode as though I had added it to the post!

    As a comparison, using the standard code block does not run it and just shows the code.

    Sorry, I know this is all off topic..

    EDIT

    Here are the results with the same code in your plugin then the default WordPress code block.

    It should not be recognising the short code!

    • This reply was modified 4 months ago by Bri.
    Plugin Author Kevin Batdorf

    (@kbat82)

    The post runs through the_content WP doesn’t differentiate a code block from a paragraph block. I’ll take a look at it though to see if I can escape those specifically since that’s definitely unwanted behavior.

    For the settings, they should persist as the defaults when you add a new page, block, etc. Just like you said.

    Thread Starter Bri

    (@tinnyfusion)

    Nice one. Thanks.

    Until this is fixed I’ll have to resort back to core or highlight.js

    Keep me updated please.

Viewing 7 replies - 31 through 37 (of 37 total)
  • You must be logged in to reply to this topic.