html entities

DunbarX at aol.com DunbarX at aol.com
Fri Oct 29 12:11:17 EDT 2010


I should have been more clear. Use the ampersand and semicolon to locate 
the original char in the source text. Convert that char with the charToNum 
function.

If your source text actually contains ampersands and semicolons, it is a 
bit more involved. The ampersand itself comes over as "&amp". So you can find 
this string and deal with it.

But the semicolon appears all by itself. Still, you can determine whether 
it is a standalone semicolon or a terminating tag by examining the chars 
precediing it. I would test extensively.

Another, maybe better, way would be to initially replace those two chars 
with something you never use (I like ASCII 240). Then run your gadget and 
restore them by replacing the resulting strings with "&" and ":".

Craig Newman


In a message dated 10/29/10 11:29:08 AM, DunbarX at aol.com writes:


> But it would be simple to take the output and do a little massaging. An
> ampersand seems always to be inserted as a tag when the function 
> encounters a
> character with ASCII above 128, and a semicolon seems always to act as a
> terminating tag.
> 
> You can write a widget to find those characters, and convert them to ASCII
> with the charToNum function.
> 
> 



More information about the use-livecode mailing list