crash recipe for htmlText?

FlexibleLearning at aol.com FlexibleLearning at aol.com
Wed Jan 12 03:17:36 EST 2005


I wrote: 

> Crashing (with and sometimes without the garbage) is fairly  consistent 
when  
> setting an embedded imgSrc that is not followed  with another character. 
The  
> garbage in this instance looks like a  dump of encrypted stack code, which 
when  
> edited causes the  crash.

Richard wrote:

> A potentially very helpful piece, though I would think such an  unusual 
> limitation should be documented.
> 
> It would seem  reasonable to assume that this:
> 
>   This is an image:<img  src="1234">.
> 
> ...would result in the IMG tag itself being the  character being used for 
> the image reference, rather than requiring one  to explicitely add one:
> 
>   This is an image:<img  src="1234"> .


It is. The additional space following the imgSrc is  not the placeholder but 
a workaround to prevent mis-formatting and crashing. As  for bug 2511, I do 
not get spaces added by the engine; I need to ensure they are  inserted manually 
in order to avoid problems.
 
 
ISSUE #2 - Space or char required before the imgSrc
 
You cannot insert text at position imgSrc -1, only imgSrc -2 or earler. If  
the imgSrc is the first char of the fld, this is problematic.
 
 
ISSUE #3 - Two Methods: ImageSource vs htmlText
 
This keeps the char...
[set the imageSource of char n of fld tFld to tRef]
Subsequently, inserting text at position -1 does not move the image but  
moves the original char to be visible.
 
This removes the char...
[set the htmltext of char n of fld tFld to "<img src=" &  quote & "1234" & 
quote & ">"]
Subsequently, text insered at position -1 is hidden 'behind' the embedded  
image.
 
In both, the embedded image itself can only be moved if text is inserted at  
position -2 or earlier (ISSUE #2 above).

/H


More information about the use-livecode mailing list