Support » Plugin: SyntaxHighlighter Evolved » [Plugin: SyntaxHighlighter Evolved] Illegal filtering of generic java code tokens

  • Thanks for this great plugin, it’s great for attrative and readable code rendering.
    Using Version 3.1.3 of the plugin, I stumpled into an issue:

    [sourcecode language=”java”]
    public class Aggregator <T> {}

    is rendered to

    public class Aggregator {}

    and thus mutilated to meaninglessness

    the generic codetoken <T> is filtered away. I know can easily be interpreted as HTML-Syntax, but here it is part of legal java syntax.

    It may be of interest, that after updating the wordpress post, the -Tag is removed from the text alltogehter.

    Generic syntax came up with Java 1.5, can you please make a statement of compatility of the plugin and the supported java syntax versions.

    When I try to use HTML-Escape tokens like < > the code

    public class Aggregator < >

    is still rendered to

    public class Aggregator

    the HTML escapes tokens are not displayed, but survive at least in the source text without being removed by any obsure hidden filtering. This is suggested as solution by should generally help, but it fails here.

    You can check the erronous rendering at my blog at:

    My idea of a syntax highligther is that of any coder. Code should be taken as literal text. No programm tokens should vanish. Only color formatting should be added. No extra preprocessing of the code should be necessary. The coders reputation should not be ruined by an syntax highlighter, that conseals some program tokens….I know this is no easy issue, interaction between wordpress renderer and the input and rendered output of the plugin may become quite complex.

    Can you please resolve this issue.

    Kind regards

    Othmar Lippuner

    PS: Sorry I now this is a nitty-gritty issue. I experienced it myself when writting this text here. At had to joggle quite a bit with these HTML escapes 😉 at least it’s not filtered out here….

Viewing 1 replies (of 1 total)
  • I further insisted on the issue above and found out a way to force correct rendering. You need to enclode the [plugin-directives [sourcecode language=”..”] ….[/sourcecode] with a Code-Tag, like

    [sourcecode language=”css”]
    your code here

    <p>Anyhow the wp-user’s guide in
    doesn’t declare this need correctly.</p>
    <p>A permanent more stable solution should be negotiated between WordPress-Team and Alex as author of this outstanding plugin.</p>
    <p>kinde regards</p>
    <p>Othmar Lippuner`

    PS: HTML-Code_element should be a HTML-Element CODE in angle brackets. But it can’t write it here!! It’s a bit a pain …..

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: SyntaxHighlighter Evolved] Illegal filtering of generic java code tokens’ is closed to new replies.