Please refrain from posting animated GIFs, memes, joke videos and so on in discussions other than those in the off topic area.

Dismiss this message to confirm your acceptance of this additional forum term of use.

URLs in comments - bug

JoefishJoefish Member Posts: 11
If a hash '#' symbol appears in a URL posted in a comment on Brickset, it does some bizarre things to interpret it, breaking the URL into three parts and applying each part separately to each chunk.

Noticeable because LEGO IDEAS uses hashes in its URLs. And also their server is a bit cheap and doesn't decode %23 as a hash either!

So, for example, this summary of everything on IDEAS with a 'classic space' tag:

http://ideas.lego.com/discover#search/f:tags=classic space/s:most_supported

gets turned into a mess where the bit before the hash is one url, the hash itself is another, and the rest a third - none of which are valid.

If you try to edit it, you see the HTML code. But edit that, give it some valid HTML, and it converts it to the mangled version again.

Comments

  • samiam391samiam391 A Log Cabin in KY, United StatesMember Posts: 4,235
    Maybe I'm misinterpreting your post, but the link works just fine for me?
  • HuwHuw Brickset Towers, Hampshire, UKAdministrator Posts: 6,334
    I've noticed this and will see if I can change the parser to accept Ideas URLs.
  • JoefishJoefish Member Posts: 11
    samiam391 said:
    Maybe I'm misinterpreting your post, but the link works just fine for me?
    It works on the forum, but paste into a comment on a news article on the main site and it breaks down.
  • HuwHuw Brickset Towers, Hampshire, UKAdministrator Posts: 6,334
    It will never be possible to accept URLs with spaces in them, which are bad practice anyway, but the # should be included in it. The regular expression I''m using does seem to accept them when tested in isolation but not when used in my code.

    I'll keep on digging...
  • HuwHuw Brickset Towers, Hampshire, UKAdministrator Posts: 6,334
    edited April 2015
    Found it, and it'll be fixed on the live site when I next do a deployment, probably at the end of the week.
  • legomattlegomatt Member Posts: 2,541
    edited April 2015
    Huw said:
    Found it, and it'll be fixed on the live site when I next do a deployment, probably at the end of the week.
    That's quite some while to hold it in... have you tried some warm water? ;oD
Sign In or Register to comment.
Recent discussions Categories Privacy Policy