hi, du this happen after the last update of SimpleTOC or has the other plugin received an update recently?
Hi! I couldn’t tell as I installed both an update of the TOC-plugin and of GB at the same time.
-
This reply was modified 3 months, 3 weeks ago by
paulanerus.
@paulanerus I’m unable to duplicate this with the Query Loop and GB 2.x. Can you possibly paste in the pattern to a Gist or Codepen so I can try this out?
Nevermind, I’m able to duplicate this.
This appears to have been a bug for a while.
I don’t have a fix for this, but it’s occuring when the HTML is resaved on LOC 461:
$content = $dom->saveHTML( $dom->documentElement );
To duplicate, use a dynamic tag inside an h2 link: {{post_permalink}}
Resulting HTML: href="%7B%7Bpost_permalink%7D%7D"
Since the code did not change in that regard, it most likely originates from something else and not an update of SimpleTOC. So since it works with everything else and the code is stable, we can’t really do anything right now. If someone has an idea or even better, a pull request on GitHub, you are welcoome to help.
@ronalfy was so kind to debug this and explained that this must be an issue for a long time. The line in the code has not been changed for years. I can’t provide a fix for something that hasn’t been broken .
The only thing that’s changed is GB 2.0’s text block was added. The way the plugin parses content hasn’t changed. The filter runs early, so it doesn’t render the dynamic tags that GB has inserted as part of attributes and WordPress automatically escapes them without the plugin having to do anything.
To remove GenerateBlocks 2.0 text block from parsing, I suggest using this snippet.
https://gist.github.com/ronalfy/4c5d4dfc0f2234614e76283eb48ce474
If you are not the original poster and you need support, please do not take over someone else’s topic. If you need support then per the forum guidelines please start your own topic.
https://wordpress.org/support/forum-user-guide/faq/#i-have-the-same-problem-can-i-just-reply-to-someone-elses-post-with-me-too
If you need support you can start your own topic here.
https://wordpress.org/support/plugin/simpletoc/
The “I have this problem too” replies have been removed. Please start your own topic instead.
How can I replicate this? I added the Plugin GenerateBlocks and then I have to do what?