Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comments
Comment #1
sibidiba CreditAttribution: sibidiba commentedI 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.
Comment #2
sibidiba CreditAttribution: sibidiba commentedIt 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?
Comment #3
soxofaan CreditAttribution: soxofaan commentedI 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
Comment #4
soxofaan CreditAttribution: soxofaan commentedAlso 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
Comment #5
boombatower CreditAttribution: boombatower commentedPlease reopen if still relevant.