HTML spans with links

hh hh at hyperhh.de
Thu Feb 6 17:07:00 EST 2020


The htmltext of a field is based on HTML3 or before.

In HTML 3/4 a span can not contain two links, in HTML5 yes.

[So a browser widget does what you explicitly wish to have.]

Or if you set the metadata of the <p>-tag instead
(= set the metadata of line x of fld 1 to "metadata1").

> JLG wrote:
> If I set the htmlText of a field to HTML that contains a span,
> and if that span also contains  an anchor or href link,
> LC separates the span into multiple ones.
> 
> For example, a field's htmlText set to this:
> 
> <p> <span metadata="metadata1">This is some text that contains the metadata.<a 
> href="#fn">linkOne</a> And here is some more text. <a href="#en"><i>linkTwo</i></a></span></p>
> 
> becomes this when retrieved:
> 
> <p> <span metadata="metadata1">This is some text that contains the metadata.<a 
> href="#fn">linkOne</a></span><span metadata="metadata1"> And here is some more text. <a 
> href="#en"><i>linkTwo</i></a></span></p>
> 
> How come it does that? Do links interfere with spans?




More information about the use-livecode mailing list