Find and Unlink URLs
Posted: Tue Feb 14, 2006 4:02 pm
I used str_replace to rewrite a few urls, however, certain url parameters contain similar names as "a href" parameter.
To be clear the url have "title" in the param.... as you know, href's tags sometimes contain (a href=domain title=xxx>)
I only rewrote a portion of the url
http://www.xxx.com/xxx.php?search=xxx&title=xxx
$buffer = str_replace("&title=", "/title/", $buffer);
The problem is that this rewrite's the title tag in the hyperlinks. (from <a href=xxx title=xxx> to <a href=xxx title/xxx>)
How can i write this rule so the "<a href" title tag is not affected?
To be clear the url have "title" in the param.... as you know, href's tags sometimes contain (a href=domain title=xxx>)
I only rewrote a portion of the url
http://www.xxx.com/xxx.php?search=xxx&title=xxx
$buffer = str_replace("&title=", "/title/", $buffer);
The problem is that this rewrite's the title tag in the hyperlinks. (from <a href=xxx title=xxx> to <a href=xxx title/xxx>)
How can i write this rule so the "<a href" title tag is not affected?