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

quicksketch - January 29, 2007 - 23:31

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

JohnAlbin - February 21, 2007 - 05:59
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

JohnAlbin - May 11, 2007 - 02:57
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

Liam McDermott - August 11, 2007 - 00:18

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

JohnAlbin - August 17, 2007 - 22:50

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

Liam McDermott - November 5, 2007 - 22:09
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

marcoBauli - November 21, 2007 - 13:39

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

Liam McDermott - November 24, 2007 - 12:10

Does not want to work here.

You probably needed to clear your cache tables as it's working fine now. :)

#9

marcoBauli - November 26, 2007 - 08:20

Liam: i do hate-love caches. it does work now! sweet, thx ;)

#10

JohnAlbin - December 4, 2007 - 22:00
Title:Replacing font with style tags» Font tags used instead of span with PHP4
 
 

Drupal is a registered trademark of Dries Buytaert.