My issue is similar to this one but I have one more issue that has not been resolved.

http://drupal.org/node/1309658

I have also patched the link module with this patch

http://drupal.org/files/1309658-query-fragment-missinng-from-token-51686...

I have urls that are now working properly as far as the query and fragment not being trimmed

My url has a query in it -

here is the url I am using - which appears fine in the field -

http://www.facebook.com/permalink.php?story_fbid=418032621562946&id=132354106797467

But when the link field is used anywhere it adds amp; after all the &

So now everywhere on the site

The url above appears as

http://www.facebook.com/permalink.php?story_fbid=418032621562946&id=132354106797467

As you can see it adds the amp;

It seems like its not encoding the &s properly ?

Please help !

I can provide any info that might be helpful thanks !!!!

CommentFileSizeAuthor
#15 link-amp-added-url-1688420-15.patch438 bytesacorso

Comments

naeluh’s picture

Title: query and fragments still giving me trouble » Query and Fragments - still giving me trouble -
naeluh’s picture

Title: Query and Fragments - still giving me trouble - » Links module adds amp; to url
naeluh’s picture

Is there any info I can provide that could aide in answering this question ?

I am really stumped as to why it would do this ?

thanks !

jcfiala’s picture

Yeah, well, that's the problem with that patch. It breaks the & character in urls, I expect. I'm starting on testing this, but I wouldn't recommend the patch.

jcfiala’s picture

Alright - I'm going to close this ticket.

What you should do is download the 7.x-1.x-dev version instead, which will prevent this problem.

(I'm not certain if you might need to go back and re-edit nodes that got this & problem, but you should check after updating link.)

jcfiala’s picture

Status: Active » Closed (fixed)

And, yeah, forgot to actually _close_ the ticket.

naeluh’s picture

@jcfiala

this worked perfect thanks!

naeluh’s picture

Priority: Normal » Major
Status: Closed (fixed) » Active

I am starting to have this problem again not sure why its happening again can someone take a look ?

My facebook links are producing the amp; after the & for my links ?

I get this
http://www.facebook.com/permalink.php?story_fbid=103293356507866&id=107869712591332

Instead of this

http://www.facebook.com/permalink.php?story_fbid=103293356507866&id=107869712591332

which is the correct url

thanks

naeluh’s picture

Version: 7.x-1.0-beta1 » 7.x-1.x-dev
naeluh’s picture

Please help if you can I dont know why it is encoding this way -
here is my example all the facebook links that include & in the url are encoded improperly

http://client.theconfluencegroup.com/dobel_report

thanks very much

davvid’s picture

I have the same issue with dev version as well.
I fixed the problem temporary with js but looking forward to do it right.

naeluh’s picture

@davvid Hey how did you do that I am interested ?

naeluh’s picture

Status: Active » Closed (fixed)

Ok so I can did some lookin around my server and I can confirm that the dev branch does correct this problem

For some reason my server had cache an old version of the code and was running the 1.0 branch

If you have this issue please update your module to the dev branch - 7.x-1.0+28-dev

davvid’s picture

@naeluh I just replaced '& amp;' with '&' if there are any in url.

if($('.field-name-field-url a').length > 0){
   $('.field-name-field-url a').attr('href', $('.field-name-field-url a').attr('href').replace( new RegExp('&', 'g'), '&'));
}

I hope update to new dev version will solve this problem.

acorso’s picture

Issue summary: View changes
StatusFileSize
new438 bytes

For those, who may have dependencies prohibiting them from upgrading the Link module, I have fixed this issue for Link v1.0 with the following patch.