The new img_assist filter deforms link URLs which contain the ampersand character. It's replaced by the HTML character &

This completely destroys Google search links, Amazon affiliate links, etc.

Comments

Darren Oh’s picture

Version: 6.x-3.x-dev » 4.7.x-1.x-dev
Darren Oh’s picture

Status: Active » Closed (fixed)

Can't reproduce in latest version.

igrok’s picture

Version: 4.7.x-1.x-dev » 6.x-2.0-alpha4
Status: Closed (fixed) » Active

I have this exact behavior occurring on my site. I don't know if it's a regression or a rare bug.

I'm using Image Assist 6.x-2.0-alpha4 on Drupal core 6.20.

The URL:

http://www.monitis.com/sharedPage.jsp?tI=FwzbdasGUkc9rAece6y%252BRw%253D%253D&uI=nln%252BlXflOCZ31zq2NZWw%25252FCK6ls%25252F2joX9Bf%252BYn2PoY48%253D

is being "sanitized" to:

http://www.monitis.com/sharedPage.jsp?tI=FwzbdasGUkc9rAece6y%252BRw%253D%253D&uI=nln%252BlXflOCZ31zq2NZWw%25252FCK6ls%25252F2joX9Bf%252BYn2PoY48%253D

I presume the offending line is #1775 in img_assist.module:

elseif ($link == 'url') {
    $output .= l($img_tag, $url, array('html' => TRUE));
}

What I find interesting is that this bug occurs whether I write the URL as & or &. In other Drupal text fields, I can use either form and the links are generated correctly.

Any suggestions?