Closed (fixed)
Project:
Ubercart
Version:
5.x-1.5
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
31 Oct 2008 at 18:47 UTC
Updated:
17 Nov 2008 at 16:43 UTC
As observed by haysuess over at http://www.ubercart.org/forum/support/7265/ampersand_and_product_attributes , check_plain gets called twice on the attributes displayed for products on the checkout page. While this normally would not cause a problem it will convert something like an ampersand into & in the first check_plain and then & in the second check_plain which results in a final output of &
Comments
Comment #1
cyu commentedMy original description got sanitized, but what I meant was that...
Comment #2
Island Usurper commentedThe checkout page wasn't using hook_cart_display() to list the products, so it was using t() to run check_plain() on the option value. hook_cart_display() wasn't doing this presumably because uc_cart_get_product_options() was already sanitizing that value.
I've fixed it by removing the check_plain() from uc_cart_get_product_options(), and adding t() to uc_product_cart_display(), so that the output is filtered at the same layer.