Title: Weird tags in code?
Last modified: April 13, 2023

---

# Weird tags in code?

 *  Resolved [pavcreations](https://wordpress.org/support/users/pavcreations/)
 * (@pavcreations)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/weird-tags-in-code/)
 * Hello,
 * I recently noticed that some of my code excerpts in articles contain some weird
   tags and fragments. For instance, in section **Input Handler class** in the following
   article at [https://pavcreations.com/command-design-pattern-for-flexible-controls-schemes/](https://pavcreations.com/command-design-pattern-for-flexible-controls-schemes/)
   you can see tags at the end in one of the code listings that shouldn’t be there:
 *     ```wp-block-code
       </basecommand,></basecommand,></inputaction,></inputaction,></actioncommandpair></actioncommandpair>
       ```
   
 * or the code is transformed to completely something else such as:
 *     ```wp-block-code
       public Dictionary<inputaction, basecommand=""> bindActions = new Dictionary<inputaction, basecommand="">();
       ```
   
 * whereas it should be:
 *     ```wp-block-code
       public Dictionary<InputAction, BaseCommand> bindActions = new Dictionary<InputAction, BaseCommand>();
       ```
   
 * I noticed it occurs mostly in C# listing but sometimes in other syntaxes as well.
   I’m on WordPress 6.2 and realise that the plugin has not been tested with this
   version yet. However, I would like to keep it because it really suits my requirements.
   Can you please let me know what can be done to fix this? Do you plan to release
   an update?
 * Thank you so much in advance. Kind Regards.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fweird-tags-in-code%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Cena (a11n)](https://wordpress.org/support/users/cena/)
 * (@cena)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/weird-tags-in-code/#post-16652103)
 * Hi [@pavcreations](https://wordpress.org/support/users/pavcreations/) ,
 * Interesting! I grabbed some of your code samples from your site (leaving off 
   the ‘weird tags’), and I can’t duplicate this:
 * ![](https://cloudup.com/cv8H_q9LeXO+)
 * Screenshot Link: [https://cloudup.com/cv8H_q9LeXO](https://cloudup.com/cv8H_q9LeXO)
 * The first two boxes are using the Syntax Highlighter block, the third the plain
   old ‘Code’ block.
 * How are you embedding the code?
 * What code editor are you using?
 * I vaguely wonder if your editor isn’t including some sort of ‘invisible code’
   when you cut and paste into WordPress; for example, I can see what looks like
   a similar ‘weird tag’ in a post from 2020:
 * [https://pavcreations.com/parallax-scrolling-in-pixel-perfect-2d-unity-games/](https://pavcreations.com/parallax-scrolling-in-pixel-perfect-2d-unity-games/)
 * Best,
 * Cena
 *  Thread Starter [pavcreations](https://wordpress.org/support/users/pavcreations/)
 * (@pavcreations)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/weird-tags-in-code/#post-16652336)
 * Hi Cena,
 * Thank you for prompt reply.
 * Usually I first copy-paste my code into text editor and turn it to plain text
   so that no special hidden extra characters are pasted over. The editors I’m using
   are Visual Studio, CLion and PHPStorm (sometimes PyCharm) but again, I always
   turn my code into plain text first to eliminate the risk of transferring any 
   weird “hidden” characters. I noticed it started happening after I upgraded to
   WP 6.2.
 * One pattern I found here is that it happens whenever there are <> tags inside
   the code. For instance
 *     ```wp-block-code
       Dictionary<InputAction, BaseCommand>
       ```
   
 * turns into
 *     ```wp-block-code
       Dictionary<inputaction, basecommand="">
       ```
   
 * and after that it’s as if SyntaxHighlighter tried to close these tags at the 
   end – and thus the weird
 *     ```wp-block-code
       </basecommand,></basecommand,></inputaction,></inputaction,></actioncommandpair></actioncommandpair>
       ```
   
 * tags that appear at the bottom. My hypothesis is that the plugin somehow treats
   these as standard html / xml tags? If possible please try to paste this line 
   on your side
 *     ```wp-block-code
       Dictionary<InputAction, BaseCommand>
       ```
   
 * , select C# as the syntax and see if it’s going to appear on the front page of
   a blog.
 * Kind Regards
 *  Plugin Support [Jay](https://wordpress.org/support/users/bluejay77/)
 * (@bluejay77)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/weird-tags-in-code/#post-16662973)
 * Hi [@pavcreations](https://wordpress.org/support/users/pavcreations/),
 * Thank you for sharing examples here. Unfortunately, we still could not reproduce
   the issue on our end. Here is how it looks:
 *  [⌊Screen Shot⌉](https://cloudup.com/caELnYFWMJQ)
 * The above test was done on a clean WordPress install without any other plugins–
   only the Syntax Highligther plugin was installed and activated.
 * —
 * Would you try doing a test on a clean WordPress environment to rule out any plugin/
   theme conflicts? [Health Check](https://wordpress.org/plugins/health-check/) 
   is a tool that can be useful for debugging, though it requires an official default
   theme like [Twenty Seventeen](https://wordpress.org/themes/twentyseventeen/).
   On the troubleshooting tab, you can click the button to disable all plugins and
   change the theme for you while you’re logged in to that session without affecting
   normal visitors to your site.
 * If you’re still seeing the issue even with all other plugins disabled, would 
   you share a more detailed step-by-step instructions, so we can reproduce it on
   our end? A screenshot of your editor view would be very helpful. Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Weird tags in code?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/syntaxhighlighter_ffffff.svg)
 * [SyntaxHighlighter Evolved](https://wordpress.org/plugins/syntaxhighlighter/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/syntaxhighlighter/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/syntaxhighlighter/)
 * [Active Topics](https://wordpress.org/support/plugin/syntaxhighlighter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/syntaxhighlighter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/syntaxhighlighter/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [Jay](https://wordpress.org/support/users/bluejay77/)
 * Last activity: [3 years, 1 month ago](https://wordpress.org/support/topic/weird-tags-in-code/#post-16662973)
 * Status: resolved