Closed zarmstrong closed 4 years ago
Can you provide an example of where this is happening? Is it happening with the auto-linking or using the [url]
tag?
I tried it out and I'm not seeing the ampersand being removed. I did notice that it's being converted into a html entity when using the url tag but not when auto-linking, although it doesn't seem to make any difference:
$ echo "this is a test http://google.com?foo=bar&baz=42" | ./bbcode.py
this is a test <a rel="nofollow" href="http://google.com?foo=bar&baz=42">http://google.com?foo=bar&baz=42</a><br />
$ echo "this is a test [url]http://google.com?foo=bar&baz=42[/url]" | ./bbcode.py
this is a test <a rel="nofollow" href="http://google.com?foo=bar&baz=42">http://google.com?foo=bar&baz=42</a><br />
Yep you're right. File this under "I didn't trace my code well".
A url with ampersand in the query string seems to break. It appears like the ampersand is stripped by default.