I have a Nivo Slider set up with Views Nivo Slider. Used the Slider Data module, v. 7.x-1.1 to set up the data type include a URL field.

Everything works except if the URL has query parameters that include an ampersand. That get changed to "& amp;amp;" (no space--put in to make it appear in this bug report) . If I change the URL field settings in the view from Default formatter to Plain Text I can get this down to "& amp;" but when I follow the link it goes to the (external) site of the link, but I get an error on that site because the URL is malformed.

Anyone see this and have a solution? I've looked all through the view config. Neither Views Nivo Slider nor Slider Data have any config. I've googled everywhere. Not sure where to go next.

CommentFileSizeAuthor
#1 2238097-urls-with-ampersands-1.patch518 bytesjohn cook

Comments

john cook’s picture

Title: URLs with amersands getting munged to HTML entity » URLs with ampersands getting munged to HTML entity
Status: Active » Needs review
StatusFileSize
new518 bytes

I had the same problem as @danbarron.

I found that changing check_url() to drupal_strip_dangerous_protocols() fixes the problem. Internally check_url calls drupal_strip_dangerous_protocols but then passes the result through check_plain, and it's check_plain() that changes the ampersands.

I've attached a patch with this change.