>> 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.