conflicts with default HTML filter badly
sibidiba - June 22, 2008 - 02:37
| Project: | GeSHi Filter for syntax highlighting |
| Version: | 6.x-1.1 |
| Component: | User interface |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
I would like to allow my visitors to post source code, highlighted with geshi filter.
Of course I also need to filter malicious HTML code, so I must enable HTML filter too.
This should not be a problem, I first use HTML filter, and then geshifilter.
Still, the result from code like:
[code lang="c"]
int main() {
}
[/code]
becomes
amp#10;int main() {amp#10;}amp#10;
where amp is a real ampersand
If the HTML filter is switched off, it geshifilter works flawless.
Using HTML filter after geshifilter is obviously wrong.
Drupal version 6.2.

#1
I guess because HTML filter comes first, this is a bug in HTML filter.
So HTML filter in Drupal 6.2 filters too much. It is not possible to leave
or even [code] blocks untouched.#2
It seems to me, the problem is, that HTML filter must come obviously before geshi filter.
But HTML filter filters out " and translates it into " so [code lang="c"] becomes [code lang=AMPquot;cAMPquot;] not a good input for geshifilter.
AMP is an ampersand. Why does not HTML filter leaves these tags untouched?
#3
I can't reproduce the issue, as far as I understand your description
in any case it is indeed advised to put GeSHi filter after the HTML filter
#4
Also note that GeShi filter uses a prepare/preprocess pass, which comes before the HTML filter,
more info at http://drupal.org/node/272435#comment-887869