Font tags used instead of span with PHP4
asterix - May 10, 2006 - 14:33
| Project: | Code Filter |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | reviewed & tested by the community |
Description
This thread here: http://www.hiveminds.co.uk/codefilter_module gives replacement code for the function codefilter_process_code($text) that replaces deprecated <font> with corresponding <style> tags. I'm tempted to use this code but know i'll lose the updates that have been incorporated since that article was written. Is there any way to add this adjustment to the module?
Regards,
Alex
----------
Contract Web Development

#1
An alternative is to upgrade to PHP 5, as this was a change in the highlight_string function.
http://us3.php.net/manual/en/function.highlight-string.php
#2
The fix seems fairly straight forward. This patch uses
str_replace()to replace the font tags with span tags.#3
Since
<font>is deprecated, this should be considered a bug. But since it's a PHP4’s fault, I’ll call it a feature request for codefilter.#4
I was about to write a patch to do the same as this, is there any chance the patch above could get committed? Does the patch need work, or is this module no longer being maintained?
#5
Liam, this module is used on the drupal.org website, so, yes, it’s being maintained.
Please test the patch and if it works for you, mark it RTBC.
#6
Sorry for not testing your patch sooner (ended up rolling my own module to fix all font tags etc. )
It's now tested and is ready to be committed.
#7
Does not want to work here.
the patch applied swift, but 'color' and 'font' tags still appear in the HTML, both in PHP4 and 5...tryed also disabling all the other input filters, but nada..
am i alone?
#8
You probably needed to clear your cache tables as it's working fine now. :)
#9
Liam: i do hate-love caches. it does work now! sweet, thx ;)
#10