Wordpress 5.1 and Syntax highlighter, problem with HTML encoded special characters

I'm using Wordpress 5.1 and Gutenberg block editor. I'm trying to show some Java code with the plugin SyntaxHighlighter Evolved. When editing a post I use the block 'Custom HTML' then add the code

[code language="java"]
ListInteger myList = new ArrayList();
[/code]

Then I save the post and the Java code will appear correctly with syntax highlighting applied to it. It will look like this

This is the result that I wanted. But a problem happens when I edit the post again, in the Wordpress editing the Custom HTML block changes to the following

[code language="java"]
Listlt;Integergt; myList = new ArrayListlt;gt;();
[/code]

The and > signs have been replaced by lt; and gt; and the code on the website becomes

Does anyone know how to fix this? thanks

Topic syntax-highlighting shortcode plugin-syntaxhighlighter Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.