rejetto forum

Software => HFS ~ HTTP File Server => Programmers corner => Topic started by: Roessi on July 12, 2010, 12:02:04 PM

Title: : to : in {.load
Post by: Roessi on July 12, 2010, 12:02:04 PM
:) sry have to ask sth again :)
why is the ":" within the ":}" replaced with ":" when i use the {.load.} macro and in the "{:" it isnt ?
is there a way to prevent from getting ":}" replaced with :}
cause hardly can use macros if this happens :/
thx for your answers :)
Title: Re: : to : in {.load
Post by: rejetto on July 12, 2010, 11:40:41 PM
tell me how to reproduce the problem
Title: Re: : to : in {.load
Post by: Roessi on July 13, 2010, 01:58:59 PM
the first txt file is the part of the template which loads the modules
the modcontent.txt is the file which is loaded
and the macros.log ...

dunno why but when i use :} in any module its replaced with $#58;}

because of the :}
the macros dont get executet right :/
Title: Re: : to : in {.load
Post by: rejetto on July 13, 2010, 04:07:52 PM
as far as i remember, you cannot load macros outside the exe's folder, for security matters.
but you can {.copy.} the lib first if the file does not {.exists.}, so you install it.
then you should be able to load.
Title: Re: : to : in {.load
Post by: Roessi on July 13, 2010, 05:29:25 PM
the macros get executed  ,
only if i use an macro inside an for example {.if macro where i need to quote sth with {: and :}
both macros inside the if else get executed because its seen as :}and not as :} :/
same for a switch ther would be every macro executed then :/
everything else works fine with executing macros in a file loaded :/
and copying to the root folder wont work because every module has a modulecontent.txt
Title: Re: : to : in {.load
Post by: rejetto on July 14, 2010, 08:54:58 AM
it's as i thought.
that was made to avoid scripters from accidentally executing external code from untrusted sources.
if you want to workaround this protection, you can {.load.} into a variable, then output the variable

{.load|file|var=x.}{.^x.}