[BUG] HTMLText <H5> incorrectly converted

Kay C Lan lan.kc.macmail at gmail.com
Wed Jul 15 01:21:59 EDT 2015


Folks,

I recently added bug 15599 which reads as:

-----------------------

Create a New Stack
Place a Scrolling Field (7.0.6) or Text Area (8.0 dp2) on it and enlarge it
to fill the stack.
In the Message Box enter:

set the textFont of fld 1 to "Arial" --must use a font with italics
set the fixedLineHeight of fld 1 to false
repeat with x = 1 to 6
put "<H" & x & ">" into tHead
put "</H" & x & ">" into tTail
set the htmlText of line x of fld 1 to tHead & "This is Heading " & x &
tTail
end repeat
put the htmlText of fld 1

You'll note that in the field only Heading 5 is in italics and if you check
the HTMLText output Heading 5 is the only one to include the <i></i> tags.

When converting <H5> to LCs <p><b><font size... equivalent, the <i></i>
tags should not be included.

-----------------------

As usual the mothership responded swiftly but slightly differently than
expected. Mark indicated that <H5> has always converted to italics and so
has closed the report. No I don't know if 'always' means always for
Revolution, always back to MetaCard, always back to HyperCard or always for
xTalk languages. So I'm just wondering if anyone here would know the
history about this and why only <H5> has been singled out to appear
differently in LC than it does in a Browser.

I assume changing it now would have consequences for some people's legacy
code.

I added a comment that maybe the Dictionary needs to highlight this anomaly.

If you consider <H5> in LC should look like <H5> in a Browser then you may
wish to add comments to 15599.

For me, I just need to write a little handler for <H5> that will go back
and remove the <i></i> tags so that my LC field is identical to the Browser
equivalent. Not a hard thing to do in LC ;-)



More information about the use-livecode mailing list