Thank you for your help Dan! :)
Deleting the two instances of 'amp' from the url does return a page with the rma number. I have added urlencode to the line, as above, but now when that page is called i get a 404 error. The url returned is as follows: /catalog/return_product.php?action=insert&oID=96&products_id=82
The curious thing for me is that if i log the returns request from the admin section (admin/return_product.php) it returns the rma value along with the correct url. On closer examination of the two files, catalog/return_product.php & catalog/admin/return_product.php, they are almost identical. The catalog/admin/return_product.php does not use the urlencode but does return the rma number correctly.
The relevent parts of the two files are below:
catalog/product_return.php
// redirect to confirmation
tep_redirect(tep_href_link(FILENAME_RETURN . '?action=sent&rma_value='. $rma_value . '&return_id=' . $ticket_id));
//tep_redirect(tep_href_link(FILENAME_RETURN . urlencode('?action=sent&rma_value='. $rma_value . '&return_id=' . $ticket_id)));
} else {
$HTTP_GET_VARS['action'] = 'new';
}
break;
case 'default':
tep_redirect(tep_href_link(FILENAME_DEFAULT));
break;
}
}
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_RETURN);
$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_RETURN, '', 'NONSSL'));
catalog/admin/product_return.php
// redirect to confirmation
tep_redirect(tep_href_link(FILENAME_RETURN . '?action=sent&rma_value='. $rma_value . '&return_id=' . $ticket_id));
} else {
$HTTP_GET_VARS['action'] = 'new';
}
break;
case 'default':
tep_redirect(tep_href_link(FILENAME_DEFAULT));
break;
}
}
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_RETURN);
catalog/product_return.php
<td class="main"><?php new infoBox(array(array('text' => nl2br($text['return_text_one'])))); ?></td>
catalog/admin/product_return.php
<td class="main"><?php echo '<center><font color=cc0000 size=3px><b>' . TEXT_YOUR_RMA_NUMBER . $HTTP_GET_VARS['rma_value'] . '</b></font></center>'; ?></td>
I have had a good read of php manual under urlencode etc and W3C recommendation for dealing with ampersands in url attribute values but am running out of ideas.
Any input is greatfully received. :'(