[RESOLVED]New URL scheme does not parse when pasted in a forum post.

Started by Tripredacus, January 13, 2014, 08:26:18 AM

previous topic - next topic
Go Down

Tripredacus

January 13, 2014, 08:26:18 AM Last Edit: October 28, 2014, 10:29:24 PM by shmax
New URL scheme uses square brackets and do not parse in the forum.

Code Select
http://www.shmax.com/products?q[filters][keywords]=tomica&q[filters]Error: Invalid toyline id (=2448

Pasted normally, the URL is broken:
http://www.shmax.com/products?q[filters][keywords]=tomica&q[filters][toyline]=2448

If you wrap it in URL tags, it gets really deformed.
[keywords]=tomica&q[filters][toyline]=2448]http://www.shmax.com/products?q[filters][keywords]=tomica&q[filters][toyline]=2448). A toyline id is always numeric, eg [toyline]10[/toyline].

shmax

Are you using Firefox? It automatically decodes urls in its address bar, which drives me nuts.

Tripredacus

Why yes I am!

That's annoying... Is there a workaround? Like pasting in Notepad first or something?

shmax


Why yes I am!

That's annoying... Is there a workaround? Like pasting in Notepad first or something?


The workaround is to use a browser that doesn't do that. I poked around a bit to see if there's a Firefox setting to turn that behavior off, but I haven't found anything, yet. The only other alternative would be for me to rewrite SMF's bbcode parser. Hmm, maybe I'll see if I can get them to do it...

shmax

Just testing...

http://www.shmax.com/products?q[filters]Error: Invalid toyline id (=3533

[toyline]=3533]http://www.shmax.com/products?q[filters][toyline]=3533). A toyline id is always numeric, eg [toyline]10[/toyline].

shmax

I've opened an issue in the github project. We'll see what happens...

https://github.com/SimpleMachines/SMF2.1/issues/1187

shmax

Not getting much love over in the SMF project for this, but I'm experimenting with my own fix. More soon.

Tripredacus

I know why they are like this. Its more along the lines of "Oh look, another guy who wants to use brackets in his URLs" type attitude.  :-X

shmax


I know why they are like this. Its more along the lines of "Oh look, another guy who wants to use brackets in his URLs" type attitude.  :-X


I've been thinking it over, and even though brackets are legal url characters, and even though I have a fix almost ready to go, it might be better to just substitute some other character for the brackets. I think most bbcode parsers are going to have trouble with them, and I can't fix them all. Sigh.

Tripredacus



I know why they are like this. Its more along the lines of "Oh look, another guy who wants to use brackets in his URLs" type attitude.  :-X


I've been thinking it over, and even though brackets are legal url characters, and even though I have a fix almost ready to go, it might be better to just substitute some other character for the brackets. I think most bbcode parsers are going to have trouble with them, and I can't fix them all. Sigh.


Well you could just delete the forum I guess.  :P

shmax


Well you could just delete the forum I guess.  :P


Sure, ha ha, but that's my point: I can't delete them all. Even if I solve the problem here on shmax.com, there are a billion other forums (all of them with more activity than this one) that would all choke on the same shmax urls. Another solution would be to nag Firefox into undoing their stupid automatic url-decoding feature. I think I'll give that a try. More soon.

Tripredacus


Sure, ha ha, but that's my point: I can't delete them all. Even if I solve the problem here on shmax.com, there are a billion other forums (all of them with more activity than this one) that would all choke on the same shmax urls. Another solution would be to nag Firefox into undoing their stupid automatic url-decoding feature. I think I'll give that a try. More soon.


A setting change might work for us regular folks, but it wouldn't help other people especially any non-members who might happen to link to a particular page.

shmax

Bump. I've got a solution in the works for this. More soon.

shmax

Fixed! Here's a sample url, taken directly from the address bar of Firefox:

http://www.shmax.com/products?q_filters_toyline=390

Firefox can handle it, bbcode can handle it, all the forums of the world can handle it. This won't fix any existing broken urls in the forums, but the old-style urls WILL still work for browsing shmax.com.

This is a pretty big change, and I was so excited about it that I didn't really test every last little thing as well as I probably should have, so please report any issues you see around the site right away.

Tripredacus


Go Up