Welcome Guest, Not a member yet? Register   Sign In
Possible bug in anchor function
#1

[eluser]davidbehler[/eluser]
I just tried using the anchor function to create a link that performs a search using google, e.g.:
Code:
echo anchor('http://www.google.com/search?q="first search term"+term2', 'Search');

However, that does not work as the anchor function removes everything after "q=". If I remove the quotes, e.g.
Code:
echo anchor('http://www.google.com/search?q=+search+term+term2', 'Search');
it works just fine.

Anyone ran into this before?
I had a quick look at the anchor function but could not find anything that would cause this...
#2

[eluser]imn.codeartist[/eluser]
that is not a bug actually if you check in your brower and do the view source actually its printing everything

Code:
<a href="http://www.google.com/search?q="first search term"+term2">Search</a>

href start " ending at q=" and once starting double quote matches ending double quote it skips rest
#3

[eluser]davidbehler[/eluser]
Yeah, I figured that out myself.

I would expect the anchor function to use urlencode or whatever to avoid such behaviour...




Theme © iAndrew 2016 - Forum software by © MyBB