1

Topic: converting font tag size

Hi there,

I have a flash based wysiwyg text editor which outputs HTML content full of font tags.  It all works fine when loading the text into flash but not so nice when displaying on an HTML page.  So, I used htmLawed to clean the text which worked great with the default settings but I've found that it is ignoring the font sizes.  The Flash text editor outputs values such as

<FONT SIZE="12"

if I change it to, for example,

<FONT SIZE="+3"

htmLawed adjusts the size accordingly, but not with the values output by the text editor.  I suppose I could make a function that does a string match for

SIZE="12"
replace with SIZE="+3"
SIZE="14"
replace with SIZE="+4"

etc but I was wondering if there was an easier way built into htmLawed?

Thanks in advance
Bill

2

Re: converting font tag size

Unfortunately, htmLawed's behavior cannot be configured to deal with the specific scenario you have. The string-replacement idea you have seems the best. An alternative is to change the htmLawed code. Function hl_tag2 handles font-size replacements. You can edit the $fs array defined in it to suit your purpose.

3

Re: converting font tag size

no problem.  thanks for the reply and for writing such a cool script!