when we have < inside <code> tags it won't be escaped (submit by dvessel in http://drupal.org/node/66110)

Comments

dvessel’s picture

Latest in cvs fixes this when the 'highlight inline code' is enabled. It's a checkbox inside 'admin/filters/x/configure' where 'x' is the input format you have set for geshifilter.

dvessel’s picture

One question..

How did you enabled highlighting for this? I thought it wasn't supported in geshi. :) I'm not looking for a technical answer. Just wondering if it will break anything.

pitpit’s picture

Latest in cvs fixes this when the 'highlight inline code' is enabled

and if you put geshifilter before 'HTML filter' in your input format >> rearrange.
But it stills be a bug in others case.

How did you enabled highlighting for this?

Actually geshi can highlight anything. When a <codegt; is found geshifilter tell geshi to not add pre or div container using GESHI_HEADER_NONE (see geshi documentation) and keep <codegt; tags in place.

dpdev

soxofaan’s picture

Version: 6.x-1.x-dev » 4.7.x-1.0
soxofaan’s picture

Title: < is not escaped » "<" and ">" is not escaped
Version: 4.7.x-1.0 » 6.x-1.x-dev

I can reproduce this with geshifilter.module version 1.22 (related to 5.x-2.x branch) as follows:

usage of input filter with only the geshi filter enabled (the point is to have no HTML filter)
default language: no syntax highlighting
input of source code without a language set (e.g. "<code> a = b < c </code>)

result: the "<" is not escaped to "&lt;"

soxofaan’s picture

Assigned: pitpit » soxofaan
soxofaan’s picture

Version: 6.x-1.x-dev » 5.x-2.x-dev
Status: Active » Fixed

Fixed by http://drupal.org/cvs?commit=81043 in 5.x-2.x branch.
When "no highlighting, just add a code container" is enabled as default highlighting mode, the ">" and "<" are encoded correctly (by usage of the plain text highlighting definition.
When "no highlighting, do nothing" is enabled, the filter does nothing, so the ">" and "<" are in the hands of other filters.

Anonymous’s picture

Status: Fixed » Closed (fixed)