Escaping greater than sign in a code block
-
All my greater than signs are appearing as > when I add a code block to my blog. I’ve tried escaping them myself but they still keep appearing as >. Is there some way to tell the code block to leave them alone or a code to enter to replace them.
The blog I need help with is: (visible only to logged in users)
-
Hi there,
The forums shows your greater than signs as greater than signs,
>. Can I assume you mean they’re being displayed at HTML entities instead?Are they displaying as HTML entities inside the editor itself, or on the published post? And when you insert them into the code block, are you typing the
>symbol, or are you typing in the entity code?Can you give a link to the post?
-
Hi,
The post with the problem is here: link to post.
In the editor they are displayed correctly, it’s only when I publish or preview the site that they change. I’ve tried changing all of the characters to the escaped versions but they still display as
>
.
-
That should have been still display as & g t ; with the spaces removed. It’s hard to post about this! The forum converts the value to a greater than.
-
Oh, I see what you mean now, thanks for the link to the post.
This is a known bug in the Block Editor, it has already been reported and our developers are looking into fixing it.While it’s waiting for the fix, as an alternative I’d suggest using the Code block instead.
-
Thanks for the update, however I’m already using the code block for this, if you look at the block of coffee below the xml it has the same issue on lines 4,5,6,7.
Regards Jackson.
-
From what I can see, on the post you mentioned you’re using SyntaxHighlighter Code Block which is the one with the bug.
I suggested you try to use the simple Code Block as an alternative. Am I missing something here?
-
Ah thanks, I’m a bit new to WordPress and didn’t realize there where two code blocks. Will try the simple non syntax one.
Thanks. Jackson.
- The topic ‘Escaping greater than sign in a code block’ is closed to new replies.