help with HTML escaping...

MisterX b.xavier at internet.lu
Sun Mar 27 02:49:00 EST 2005


Andre,

Work the html translations via a container variable if possible.

Using the field's html is not as consistant as the html code in the source...

put fld codes in codelist
put the htmltext of fld html into htsource
repeat for each line l in codelist
put item 1 of l into rs
put item 2 of l into ns
replace rs with ns in htsource
end repeat
set the htmltext of fld html to htsource

that's should do it correctly...

check out the DiscreteBrowser for many more ideas or how to's...

http://www.monsieurx.com/modules.php?name=Downloads&d_op=viewdownload&cid=11

cheers
Xavier


> -----Original Message-----
> From: use-revolution-bounces at lists.runrev.com 
> [mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of 
> Andre Garzia
> Sent: Sunday, March 27, 2005 00:28
> To: How to use Revolution
> Subject: help with HTML escaping...
> 
> Hi Folks,
> 
> I am having some trouble escaping text with international 
> characters for HTML pages. I thought a simple approach, I 
> built a field with all the escapes like:
> 
> á á
> é é
> Á Á
> ...
> 
> and stuff like that, then I used a repeat loop to loop thru 
> the data replacing the ocurrence of the first char with the 
> corresponding HTML entity, guess what? It does not work, the 
> replace command is not replacing them, it's a big field, it 
> works only for some lines, others are completelly ignored, I 
> used the debugger to iterate thru  the code, and guess what, 
> it's all appearing correct just the engine is telling the the 
> "é" inside the field is not the same "é" that it needs to 
> escape... damn. Any clue out there? does anyone here got a 
> HTML escaping routines for international chars?
> 
> Andre
> --
> Andre Alves Garzia  2004  BRAZIL
> http://studio.soapdog.org
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
> 



More information about the use-livecode mailing list