Page MenuHomePhabricator

Special characters <> are shown as &lt;&gt;
Closed, InvalidPublic

Description

Author: gw_peter

Description:
The character < and > are shown as &lt;&gt; when the sql language is choosen.

example: - also see the attachment

<syntaxhighlight lang="sql">
select * from costumer
where (id > 200 or id < 800)
and id <> 250
</syntaxhighlight>


Version: unspecified
Severity: normal

Details

Reference
bz36630

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 12:20 AM
bzimport added a project: SyntaxHighlight.
bzimport set Reference to bz36630.
bzimport added a subscriber: Unknown Object (MLST).

gw_peter wrote:

Code typed and result with the error shown

Attached:

syntaxhighlight_error.jpg (238×319 px, 82 KB)

https://www.mediawiki.org/wiki/User:MarkAHershberger/Bug36630

WFM on mediawiki.org and my own wiki. Maybe there is a conflict with some other extension?

gw_peter wrote:

Using template parameters in tag.

Root couse found -

By default it's impossible to use triple braced parameters inside sytntaxhighlight tag. To enable this I changed the extension a bit:

In file SyntaxHighlight_GeSHi.class.php, line 23:
this line was substituded:

public static function parserHook( $text, $args = array(), $parser)

with these two lines:

public static function parserHook( $text, $args = array(), $parser, $frame )
$text = $parser->recursiveTagParse($text, $frame);

works pretty need but courses the problem descripted and shown in attachement.

Is there a better way to enable the use of SyntaxHighlight in a wiki-template?

(In reply to comment #3)

Is there a better way to enable the use of SyntaxHighlight in a wiki-template?

Could you file a new bug requesting this? I'm closing this one since the original issue is invalid.