<% %> should not be interpreted as PHP
Liam McDermott - August 16, 2007 - 22:55
| Project: | Code Filter |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Description
A user of my forum has been posting a lot of ASP problems (mixed in with some bad html), the codefilter module interprets this as PHP. This causes problems with the rendering of the site and messes up the code entered.
The codefilter module should ignore
<?php
?>| Attachment | Size |
|---|---|
| withtags.png | 70.35 KB |

#1
How the same code looks with < % % > matching removed.
#2
A patch to fix the problem.
#3
I think ASP-style and short tag-style escapes are a bad idea. But rather than removing the ability to highlight them, we should add an option to the filter to allow/disallow these tag styles.
#4
JohnAlbin: if I create a patch to do this would you be able to commit it? Is someone maintaining this module?
Sorry, just don't want to do work for it to fall down a black hole. :)
#5
I don’t have commit access for this module. But if you post a patch, I’ll review it.
Also, I’m pretty sure that if a patch gets reviewed and marked RTBC, that Steven will review it and decide whether to commit it. This module is pretty important to the Drupal.org website and most certainly is being maintained.
#6
Sorry for not having followed-up on this sooner. Attached is a patch that adds the option to switch off ASP-style filtering to the filter Configure tab. ASP-style filtering is on--which is the module's current behaviour--by default.
#7
#8
You may want to test to see if this issue occurs on Drupal 6 beta's as well,. Code filter has been moved into core with Drupal 6. If it is an issue, then file a separate bug report.
#9
Yes likely D6 suffers from this but I have no problems just ripping out ASP tags support from codefilter as the PHP manual strongly discourages their use so it's quite expectable noone ever will post using those.
#10
I looked at Drupal 6 and, for the life of me, I could not find a "Code filter" input filter or anything like it. Care to enlighten me?
Liam, I'll review your patch tonight, if I can get to it.