[On-Rev] Photo Gallery problem

Sarah Reichelt sarah.reichelt at gmail.com
Fri Jun 26 03:49:03 EDT 2009


On Fri, Jun 26, 2009 at 5:35 PM, Sarah Reichelt<sarah.reichelt at gmail.com> wrote:
>> In your code, on the page "see script"
>>
>> <http://kenjikojima.com/Photo/GreatLawn/thumbnail.irev?file=thumbnail.ir
>> ev>
>>
>> in the lines 22-23 you write:
>>
>>        replace "<" with  "<" in tScript
>>        replace ">" with  ">"  in tScript
>>
>> is there a typo?
>>
>> Nonetheless, that works -- and generating on the fly a code page is a
>> great idea :-)
>
>
> Those lines of code will be replacing < & > with their HTML entities
> < and >
> but the code display translates them back. I had the same problem.
>
> Andre has managed to get his script lister to show the entities, but I
> haven't managed to work out how yet.

Worked it out...
If you replace ampersands too, then the < and > entities will
display correctly inside a <pre> tag.
Not quite sure why this works, but it does, so instead of 2 replace
lines, use these 3:

		replace "&" with "&" in tScript
		replace "<" with "<" in tScript
		replace ">" with ">" in tScript

Cheers,
Sarah



More information about the use-livecode mailing list