Thomas Søndergaard writes:
 > ....
 > I know that I must use url_quote, but how do I do that...?
Zope *SHOULD* export all quoting and formating functions to
be used in expressions. Unfortunately, it does not.

You can emulate it with specialized DTML methods. As an example:

Define the DTML method: url_quote as:
       <dtml-var text url_quote>
Ensure, there is no whitespace whatsoever before '<' or after '>'!

You call this function with: url_quote(text=<your_text>)

 > <dtml-call "REQUEST.set('firstname', firstnam)">
 > <dtml-call "REQUEST.set('surname', surnam)">
Get rid of these by using the correct name in the first place!

 > <dtml-call "REQUEST.set('email', eadr)">
   <dtml-call "REQUEST.set('email', url_quote(text=eadr))">
 > ...

As someone else already pointed out, you can use
"_.string.replace(eadr,'@','_')" if only the '@' makes
problems. But email addresses may contain other funny
characters not allowed in id's. Therefore, "url_quote" is
safer (but not completely safe -> '/').


Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to