We are currently using the colorbox module to bring in an iframe of various web content. The colorbox trigger is the node title, but the colorbox is causing special characters in the title to appear as code rather than plain text.

Characters such as apostrophies, quotation marks, ampersands and other punctual are the usual suspects.

An apostrophy is being replaced with ''#039;

You can see an example here: http://www.casefoundation.org/topic/corporate-responsibility/latest?page=3

An ampersand creates &

Example here: http://www.casefoundation.org/topic/corporate-responsibility/latest?page=5

Is this something that can be fixed views or needs to be done at the module level?

Comments

wlgrana’s picture

This is happening to me as well. Any info on whats causing this and how to fix it?

wlgrana’s picture

joshtabb,

Where you able to solve this problem?

Best,

Will

wlgrana’s picture

By adding

'html' => TRUE

to the l function it will allow comas, apostrophes, etc. Below is an example:

$link_tag = l($link_text, $popup, array('query' => 'width='. $width .'&height='. $height .'&title='. $caption .'&iframe=true', 'attributes' => array('class' => 'colorbox-load', 'rel' => $gallery_id), 'html' => TRUE));

Here is more info about the l function: http://api.drupal.org/api/drupal/includes--common.inc/function/l/7

best,

Will

wlgrana’s picture

Status: Active » Closed (fixed)

Fixed

misscosmic’s picture

Title: Colorbox trigger creating funky characters in node title » in which document?

Could you tell me in what document I should change this script pleaz?