Problem with linktext and html characters
Devin Asay
devin_asay at byu.edu
Thu Jun 11 17:01:28 EDT 2009
On Jun 11, 2009, at 2:07 PM, Alejandro Tejada wrote:
> Recently i was working with linktext and unicode text.
> Following the advice published by Devin Asay in his tutorials
> about Unicode text, i converted the unicode text to htmltext
> for easiest manipulation between fields.
>
> But now, i have this problem with cutoff links
>
> To demostrate this bug, please create a new stack
> with two fields and a button.
>
> Set the script of button 1 to:
>
> on mouseup
> set the htmltext of fld 2 to fld 1
> end mouseup
>
> Now, paste the following text in field 1:
>
> <a href="goj<font face="helvetica" lang="el">ū</
> font>on">goj<font face="helvetica" lang="el">ū</font>on</a>
>
> When you click the button, the text of field 2 becomes this:
>
> kon">gojūon
>
> The linked text starts at "kon" and ends in the letter "ū", leaving
> out of
> the linktext the last two letters. (Where did this "k" come from?)
> The link is messed too and shows as "goj" not as "gojūon".
>
> Actually, the expected result was the single word: "gojūon"
> as a linked text to the word "gojūon".
Confirmed here. I have run into this bug before, or a similar one. I
had a similar problem when I was trying to enclose a string with an
imbedded image tag in an anchor tag. See <http://quality.runrev.com/qacenter/show_bug.cgi?id=8010
>. See also references to other bugs in this report. While what
you're experiencing isn't *exactly* the same thing, it seems related.
I finally had to resort to putting an extra anchor tag in the string
with the same href in both tags. So, using your example, what I ended
up with is something like:
<a href="goj<font face="helvetica" lang="el">ū</font>on">goj<font
face="helvetica" lang="el">ū</font></a><a href="goj<font
face="helvetica" lang="el">ū</font>on">on</a>
Ugly and kludgy but it worked.
HTH
Devin
Devin Asay
Humanities Technology and Research Support Center
Brigham Young University
More information about the use-livecode
mailing list