Well its usually simpler as it looks. Didn't need the mapper and now I have (I think) the default allowed and just added the two chars. Cheers, Alex <sanitizer> <valid> <add value="%"/> <add value="|"/> </valid> </sanitizer> ________________________________________ Van: galaxy-dev-bounces@lists.bx.psu.edu [galaxy-dev-bounces@lists.bx.psu.edu] namens Bossers, Alex [Alex.Bossers@wur.nl] Verzonden: woensdag 16 februari 2011 16:33 Aan: galaxy-dev@bx.psu.edu Onderwerp: Re: [galaxy-dev] Percent and pipe sign in text input fields Daniel/Pieter, thanks for the hints. I solved it using the santizer tags. Even though it was quite cryptic what to do... but below is what I added to the param text tag and now it allows the chars I want. Now I will fiddle around somewhat to use the default inital allowed characters and just add the % and | characters to it.... Thanks Alex <sanitizer> <valid initial="string.printable"> <remove value="'"/> </valid> <mapping initial="none"> <add source="'" target=""/> </mapping> </sanitizer> ________________________________________ Van: Pieter Neerincx [pieter.neerincx@gmail.com] Verzonden: woensdag 16 februari 2011 15:44 Aan: Bossers, Alex CC: galaxy-dev@bx.psu.edu Onderwerp: Re: [galaxy-dev] Percent and pipe sign in text input fields Hi Alex, Galaxy "sanitizes" the params to remove unsafe characters. It's a security feature. From a previous post some time ago: If you trust your users you can add the option name to NEVER_SANITIZE in lib/galaxy/utils/_init_.py You can also have a look at that *.py file and lib/galaxy/tools/parameters/sanitize.py to see what gets sanitized. AFAIK this is not well documented on the Wiki... Cheers, Pi On Feb 16, 2011, at 1:23 PM, Bossers, Alex wrote:
Hello all,
I have a tool based on blastdbcmd that contains a param tag of type text. I want to be able to use the % sign in that text field users can enter (%g is for instance the field identifier for gi). However, if I do for instance %f or "%f" it returns Xf or "Xf" in the the variable. For single field lines I solved it to remove the % from the argument and only add it at command line, but in this case it can contain % signs anywhere... For instance %g|%a|%t should return by the tool gi..|accno|title. However the variable returned by the tool xml is "XgXXaXXt". So it also masks the | (pipe) sign... How to solve this?
Thanks for any help.
Alex
_______________________________________________ To manage your subscriptions to this and other Galaxy lists, please use the interface at:
------------------------------------------------------------- mobile: +31 6 143 66 783 e-mail: pieter.neerincx@gmail.com skype: pieter.online ------------------------------------------------------------- _______________________________________________ To manage your subscriptions to this and other Galaxy lists, please use the interface at: http://lists.bx.psu.edu/