View Single Post
Old 01-19-2005, 04:09 AM   #18
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
>> working only if link contain only one pair of []

So it works in example but not with PhpDig? What's a link to a page containing multiple [ ] in its links?

>> first regexp doesn't needed becourse site have'nt frames

Other people might have frames though.

The RFC2732 protocol states in part:
Quote:
Code:
   (3) Add "[" and "]" to the set of 'reserved' characters:

      reserved    = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" |
                    "$" | "," | "[" | "]"

   and remove them from the 'unwise' set:

      unwise      = "{" | "}" | "|" | "\" | "^" | "`"
Sometimes using reserved characters in links, other than for their intended purpose, can cause problems as was the case in this thread (colon used outside of <user>:<pass>@<host>:<port> meaning so the PHP parse_url function did not understand).

You might want to consider encoding your URIs according to this rather than use literal square brackets in your links.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote