Re: [WebDNA] Display Live URL from a Block of Copy

This WebDNA talk-list message is from

2009


It keeps the original formatting.
numero = 101955
interpreted = N
texte = --0016e65097feb90e0504627a7c0d Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Eddie, Something like this should work. I figure that there should only be two possible characters at the end of a URL, a space or a carriage return. So the first grep checks for a carriage return and inserts a space, while the second checks for a space and than wraps the url in a 'a href'. Note that this doesn't check the validity of the URL, if you are putting this code on the landing page after a form submission then you need to check the correct hex code for a submitted carriage return. [grep search=http://([^ ]*)&replace=\1][grep search=http://([^%0A]*)&replace=http://\1 ] http://www.url1.com/ http://www.url2.com/test/test?test=test$ http://www.url3.co.uk [/grep][/grep] - Tom --0016e65097feb90e0504627a7c0d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Eddie,

Something like this should work. I figure that th= ere should only be two possible characters at the end of a URL, a space or = a carriage return.  So the first grep checks for a carriage return and= inserts a space, while the second checks for a space and than wraps the ur= l in a 'a href'.

Note that this doesn't check the validity of the UR= L, if you are putting this code on the landing page after a form submission= then you need to check the correct hex code for a submitted carriage retur= n.


[grep search=3Dhttp://([^ ]*)&r= eplace=3D<a href=3D"http://\1">\1</a>][grep search=3D= http://([^%0A]*)&replace=3Dhttp://\1 ]

http://www.url1.com/
http://www.url2= .com/test/test?test=3Dtest$ http://ww= w.url3.co.uk

[/grep][/grep]

- Tom
--0016e65097feb90e0504627a7c0d-- Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Display Live URL from a Block of Copy (Tom Duke 2009)
  2. Re: [WebDNA] Display Live URL from a Block of Copy ("Dan Strong" 2009)
  3. Re: [WebDNA] Display Live URL from a Block of Copy ("Dan Strong" 2009)
  4. [WebDNA] Display Live URL from a Block of Copy (Eddie Z 2009)
--0016e65097feb90e0504627a7c0d Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Eddie, Something like this should work. I figure that there should only be two possible characters at the end of a URL, a space or a carriage return. So the first grep checks for a carriage return and inserts a space, while the second checks for a space and than wraps the url in a 'a href'. Note that this doesn't check the validity of the URL, if you are putting this code on the landing page after a form submission then you need to check the correct hex code for a submitted carriage return. [grep search=http://([^ ]*)&replace=\1][grep search=http://([^%0A]*)&replace=http://\1 ] http://www.url1.com/ http://www.url2.com/test/test?test=test$ http://www.url3.co.uk [/grep][/grep] - Tom --0016e65097feb90e0504627a7c0d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Eddie,

Something like this should work. I figure that th= ere should only be two possible characters at the end of a URL, a space or = a carriage return.  So the first grep checks for a carriage return and= inserts a space, while the second checks for a space and than wraps the ur= l in a 'a href'.

Note that this doesn't check the validity of the UR= L, if you are putting this code on the landing page after a form submission= then you need to check the correct hex code for a submitted carriage retur= n.


[grep search=3Dhttp://([^ ]*)&r= eplace=3D<a href=3D"http://\1">\1</a>][grep search=3D= http://([^%0A]*)&replace=3Dhttp://\1 ]

http://www.url1.com/
http://www.url2= .com/test/test?test=3Dtest$ http://ww= w.url3.co.uk

[/grep][/grep]

- Tom
--0016e65097feb90e0504627a7c0d-- Tom Duke

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:

WebCat2 beta 11 - new prefs ... (1997) WebCat2b13MacPlugIn - [shownext method=post] ??? (1997) One other big addition... (1997) RE: storefront (1998) attn: smitmicro - cart limitation (2002) Multi-Row Tables from a search. (1997) Trouble with Netscape (1998) SetMIMEHeader Behaviour (2000) emailer (1997) customer info (2001) WebCat2b13MacPlugIn - [include] (1997) RE: is sku a REQUIRED field on NT (1997) Where do you put files? (2000) Re[3]: 2nd WebCatalog2 Feature Request (1996) DBServer question (2005) Help!!!! (1997) Format question WC Mac f3 (1997) Virtual hosting and webcatNT (1997) [WebDNA] Sorry WebDNA server not running - September 2019 Edition (2019) cc auth with [purchase] (1998)