Should engine be applying link or metadata to an LINEFEED (LF) character?

Trevor DeVore lists at mangomultimedia.com
Tue Oct 24 15:55:52 EDT 2017


Hi all,

I’m seeing some behavior that I think is incorrect when setting the
htmltext property of a field. I would be interested in other takes on it
prior to filing a report, however.

Take the following HTML:

<p>This is <span metadata="90660"><font color="#3597F3">line
1</font></span></p>
<p>This is line 2</p>

If you set the htmltext of a field using the above html then character 15
is a linefeed. If you check the metadata of character 15 it will be 90660.
You can confirm this by doing the following:

1) Create a new stack
2) Add a field
3) Copy the html to the clipboard
4) Execute the following in the multiline message box:

```
set the htmltext of field 1 to the clipboarddata
put 15 into tChar
put charToNum(char tChar of field 1) & cr & the metadata of char tChar of
field 1
```

I don’t think the metadata (or link) should be applied to the LF character.
The metadata should only be applied to the characters that the <span> wraps
and the </p> tag is outside of the <span>. Is there a reason the current
behavior is desirable and shouldn’t be changed?

-- 
Trevor DeVore
ScreenSteps
www.screensteps.com



More information about the use-livecode mailing list