Download & Extend

Font tags used instead of span with PHP4

Project:Code Filter
Version:5.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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

Comments

#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

Version:6.x-1.x-dev» 5.x-1.x-dev

The fix seems fairly straight forward. This patch uses str_replace() to replace the font tags with span tags.

AttachmentSize
xhtml_0.patch 1.06 KB

#3

Category:support request» feature request
Status:active» needs review

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.

AttachmentSize
xhtml_1.patch 1.41 KB

#6

Status:needs review» reviewed & tested by the community

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

Does not want to work here.

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

Title:Replacing font with style tags» Font tags used instead of span with PHP4

#11

Status:reviewed & tested by the community» fixed

Committed.

#12

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here