I have a simple attribute that allows the user to enter text into a text field. When the user clicks the Add to Cart button, the user's text is added as a query string variable by the uc_node_checkout_add_to_cart_submit function.

The uc_node_checkout_add_to_cart_submit does not urlencode the submitted value so any text that contains a & is cut short and subsequent attributes break.

Solution: urlencode the oid variable. I added the urlencode step to the code and rolled that attached patch. I'm not sure if I picked the best place to do so, but it seemed to work.

CommentFileSizeAuthor
urlencode-attributes.patch452 bytesdouglasmiller

Comments

millenniumtree’s picture

Status: Active » Needs review

+1 seems reasonable

stewart.adam’s picture

Status: Needs review » Reviewed & tested by the community

Works for me too.