Re: Confused about Grep Syntax

This WebDNA talk-list message is from

2004


It keeps the original formatting.
numero = 56853
interpreted = N
texte = Don't URL un-named parameters - WebDNA will only do an automatic UNURL if the parameter is named. For example: [redirect [url]dest.html?p1=a&p2=b[/url]] will try to redirect to a page named "dest.html%3Fp1%3Da%26p2%3Db" Either of these will work fine - no parameter name and no url context, or add the url= parameter name and keep the url context: [redirect dest.html?p1=a&p2=b] [redirect url=[url]dest.html?p1=a&p2=b[/url]] Also, don't URL if the values have already been URL'ed, unless you want to actually pass the URL'ed value, since the second URL will URL the percent signs generated by the first URL. There are cases where you do want this double-URL, though, such as storing encrypted values in cookies. As an example: [text]var=[url]ab&cd[/url][/text] [replace db=...]field1=[var]&field2=[url][var][/url][/replace] would result in field1 containing "ab&cd", while field2 would contain "ab%26cd" - brian On Mar 15, 2004, at 7:54 AM, devaulw@onebox.com wrote: > For the sake of discussion, when is it not appropriate to wrap > parameters or user input in [url] tags? > > Thanks. > > > > -----Original Message----- > From: John Peacock > Sent: Mon, 15 Mar 2004 10:51:26 -0500 > To: (WebDNA Talk) > Subject: Re: Confused about Grep Syntax > > Jesse Crofoot wrote: > >> I figured it was going to be something simple like that. I had tried >> [raw][/raw] but never thought of trying the url tag. > > [url] is almost always the correct thing to wrap parameter values > with, no matter what you are doing. In particular, it is always > appropriate to wrap user supplied input with [url]... > > John ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Confused about Grep Syntax ( Brian Fries 2004)
  2. Re: Confused about Grep Syntax ( Kenneth Grome 2004)
  3. Re: Confused about Grep Syntax ( Brian Fries 2004)
  4. Re: Confused about Grep Syntax ( Donovan Brooke 2004)
  5. Re: Confused about Grep Syntax ( Kenneth Grome 2004)
  6. Re: Confused about Grep Syntax ( John Peacock 2004)
  7. Re: Confused about Grep Syntax ( devaulw@onebox.com 2004)
  8. Re: Confused about Grep Syntax ( John Peacock 2004)
  9. Re: Confused about Grep Syntax ( "Jesse Crofoot" 2004)
  10. Re: Confused about Grep Syntax ( John Peacock 2004)
  11. Confused about Grep Syntax ( "Jesse Crofoot" 2004)
Don't URL un-named parameters - WebDNA will only do an automatic UNURL if the parameter is named. For example: [redirect [url]dest.html?p1=a&p2=b[/url]] will try to redirect to a page named "dest.html%3Fp1%3Da%26p2%3Db" Either of these will work fine - no parameter name and no url context, or add the url= parameter name and keep the url context: [redirect dest.html?p1=a&p2=b] [redirect url=[url]dest.html?p1=a&p2=b[/url]] Also, don't URL if the values have already been URL'ed, unless you want to actually pass the URL'ed value, since the second URL will URL the percent signs generated by the first URL. There are cases where you do want this double-URL, though, such as storing encrypted values in cookies. As an example: [text]var=[url]ab&cd[/url][/text] [replace db=...]field1=[var]&field2=[url][var][/url][/replace] would result in field1 containing "ab&cd", while field2 would contain "ab%26cd" - brian On Mar 15, 2004, at 7:54 AM, devaulw@onebox.com wrote: > For the sake of discussion, when is it not appropriate to wrap > parameters or user input in [url] tags? > > Thanks. > > > > -----Original Message----- > From: John Peacock > Sent: Mon, 15 Mar 2004 10:51:26 -0500 > To: (WebDNA Talk) > Subject: Re: Confused about Grep Syntax > > Jesse Crofoot wrote: > >> I figured it was going to be something simple like that. I had tried >> [raw][/raw] but never thought of trying the url tag. > > [url] is almost always the correct thing to wrap parameter values > with, no matter what you are doing. In particular, it is always > appropriate to wrap user supplied input with [url]... > > John ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Brian Fries

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

TCPconnect issue (2000) [date format] w/in sendmail (1997) Practice runs ? (1997) WebCat/CyberStudio Compatibility (1998) Sku numbers (1997) lookups or math? (1998) Trouble with formula.db (1997) Help formatting search results w/ table (1997) Mondo amounts of Mail [long] (1999) [WriteFile] problems (1997) Quit revisited (1997) Not reading code (1997) Privacy Issue (Built in sniffer) (2003) Quit revisited (1997) WebCat b13 CGI -shownext- (1997) Listserver problem (1997) addlineitems within formvariable loop (1998) redirect from the errorsMessages.db entry (1997) Message Board (2001) b18 problem on NT 4.0 (1997)