Long URLs become broken when posted

Is something wonky on the site? Describe the problem to us, and we'll fix it ASAP.
Forum rules
Bug Reporting Guidelines

Before Posting
Please make sure someone hasn't already reported the problem you're experiencing before creating a new topic. Confirmed issues have been stickied in this forum.

Rules

    1) Use a descriptive title when starting a bug topic. Example: "Comic images not showing up" Do not use vague titles like, "problem" or "uh ohh"

    2) Describe your problem in detail. Explain exactly what is wrong. Post images, screen shots, links, code snippets - whatever is relevant. The better the information you provide, the better the solution you will receive.

    3) Be polite and patient. We fix these issues as fast as we can. Please be patient with us as we work toward a solution.

Long URLs become broken when posted

Postby BaldDumboRat » June 3rd, 2010, 9:20 pm

I've been trying for the past hour to link people to offsite images in my author comments, but whenever I post a long URL it automatically shoves a space in the url, making the link not work. I know people can copy the whole thing and delete the space after pasting it in the browser, but that's a bit of a hassle and I'm not sure how many people would pick up on that.
I tried fixing this by instead of posting the link directly, using HTML to link to it with a small keyword to click, but it seems that doesn't work either. The link directs people to a broken url with a space crammed in it.
This has been around for quite some time, but I'm wondering if there is any kind of solution?
Image Image Image
Image Image
User avatar
BaldDumboRat
 
Posts: 18
Joined: August 24th, 2008, 6:43 am

Re: Long URLs become broken when posted

Postby Coeus » June 3rd, 2010, 11:43 pm

Do you have an example somewhere I can take a look at?
User avatar
Coeus
 
Posts: 43
Joined: May 31st, 2010, 2:45 am

Re: Long URLs become broken when posted

Postby BaldDumboRat » June 4th, 2010, 4:36 am

Hm, my comment on this page has it happen:
http://superuke.smackjeeves.com/comics/ ... ter-pg-11/ I pasted the full URL, and when I hit edit it doesn't space it out, but on the actual page when it posts, it does. So it makes a broken up link (warning NSFW)
Image Image Image
Image Image
User avatar
BaldDumboRat
 
Posts: 18
Joined: August 24th, 2008, 6:43 am

Re: Long URLs become broken when posted

Postby Coeus » June 4th, 2010, 7:08 am

Just fascinating!
At first I thought it must have something to do with wrapping, as that commonly breaks long urls and often adds unintentional whitespace. However, I tried it on my test site which has a much wider comment area (and thus should not attempt to wrap), and same issue. Additionally, as you have pointed out, long links within <a href>'s are broken as well.

So now I had a look at the link, thinking maybe it was something unique to that page. Alas, this was not the case.

So I did a bunch of research, and couldn't find anything like this that didn't involve one of two things:
    1. Wrapping/forced code breaks
    2. Enforced character limits.
The issue with these solutions is that they don't fit the symptoms. Unless there is some forced character limit within the comment .php code (in which case, Dan will have to cover this one), there should be no reason why this happens --especially because wrapping would not affect a url within an <a href>.
-----------------------

Alright so negativity over, time for the solutions. You have a couple of options, but the easiest are Plaintexting and URL shortening. Plaintexting means adding '<' and '>' to the beginning and end of your url respectively, causing the hyperlink to just become plain text. The pro is that the link can be easily copied without being broken, but, yes, it is an inconvenience that you cannot just click the link.
The other option, URL Shortening, is something that has been popularized by the advent of Twitter, which has an enforced character limit. Essentially you just use a site that takes your long url, and creates a redirected version that is much shorter. I believe Bit.ly is the best, but I'm afraid I cannot recommend with any personal experience, just by what I have read and heard.

I'm sorry I couldn't answer your question more explicitly! I'm afraid it is something I have never seen before, and to be honest I am quite stumped. I'll definitely keep looking into it, and if anyone else knows the answer I do hope they post here!
User avatar
Coeus
 
Posts: 43
Joined: May 31st, 2010, 2:45 am

Re: Long URLs become broken when posted

Postby trenton_dawn » June 4th, 2010, 6:12 pm

This also seems to happen with any long string of text. The spacing seems to regularly happen at either 90 and 92 characters. I was unable to determine any cause.
Gaia, a fantasy comic
Ghost, an online novel — Sketchbook thread — deviantArt
Need assistance with anything? Feel free to PM me.
Seven Rain wrote:Trenton speaks words of wisdom.
User avatar
trenton_dawn
 
Posts: 2710
Joined: December 14th, 2006, 7:59 pm
Location: Auberdine, Darkshore (Alliance Territory)

Re: Long URLs become broken when posted

Postby smbhax » April 11th, 2019, 1:05 pm

This bug is still active. I ran into two instances of it in my latest Author Comment, on this page:

http://smbhax.smackjeeves.com/comics/27 ... 6-page-58/

The two links that get broken are in the final third of the comment, a little below the image of the relativistic jet. The URL in the CBC news link

Code: Select all
the CBC has a pretty good and still <a href="https://www.cbc.ca/news/technology/event-horizon-telescope-black-hole-photographed-1.5081243">fairly lengthy article</a> on all this

gets changed to

Code: Select all
https://www.cbc.ca/news/technology/event-horizon-telescope-black-hole-photographed-1%20.5081243

and the URL in the CNN news article link

Code: Select all
a photo of scientist Katie Bauman, who <a href="https://www-m.cnn.com/2019/04/10/us/katie-bouman-mit-black-hole-algorithm-sci-trnd/index.html">wrote</a> one of the EHT's imaging algorithms

gets changed to

Code: Select all
https://www-m.cnn.com/2019/04/10/us/katie-bouman-mit-black-hole-algorithm-sci-trnd/i%20ndex.html

That's what I get when I copy and paste; when you hover over the links or click on them, the "%20" part, which is what has changed--SmackJeeves has inserted it into the URL for some reason--shows up as a space. The links do not work with this change.

When I try editing the comment, the spaces are not there. If I re-create the link again, and save the edit, definitely with no space in the URL, the space still re-appears in the edited comment.
Image
User avatar
smbhax
 
Posts: 54
Joined: July 9th, 2009, 3:28 am
Location: Seattle, WA

Re: Long URLs become broken when posted

Postby eishiya » April 11th, 2019, 1:37 pm

The "reason" for this is to prevent super long page-stretching strings of text in comments. The problem is that this is applied naively to the raw text with no consideration of mark-up, URLs, etc.
Image
User avatar
eishiya
 
Posts: 9845
Joined: December 5th, 2009, 11:17 am


Return to Bugs & Glitches

Who is online

Users browsing this forum: No registered users and 1 guest