Hello,
My site has been up and running for about 1 year now on Drupal 6.14 currently. Just 2 days ago the shipping quotes from the USPS website are coming back in a weird format. I was wondering if anyone else is having issues with these or could point me in the right direction.

Here is what the USPS site is displaying for my customers:

 U.S.P.S. Priority Mail<sup>®</sup> Flat Rate Envelope: $7.20
 U.S.P.S. Priority Mail<sup>®</sup>: $7.35
 U.S.P.S. First-Class Mail<sup>®</sup> Postcards: $13.38
 U.S.P.S. Express Mail<sup>®</sup>: $15.50
 U.S.P.S. Express Mail<sup>®</sup> Flat Rate Envelope: $20.55
 U.S.P.S. Express Mail<sup>®</sup> Sunday/Holiday Delivery: $28.00
 U.S.P.S. Express Mail<sup>®</sup> Sunday/Holiday Delivery Flat Rate Envelope: $33.05

As you can see those characters should not be in there!

Thank Mark

Comments

fragger_fox’s picture

Previously the USPS API was returning plain strings. Now it returns the Strings with HTML characters encoded within the return XML.

You need to use the htmlspecialchars_decode() function to get the proper Display string before the items are displayed.

Before using the function the string

looks like this

USPS First-Class Mail<sup>®</sup> International Package**: $6.03

and after passing through the function

USPS First-Class Mail® International Package**: $6.03

I had a similar problem in my client's website regarding this, I guess I have to manually patch the Ubercart USPS module to show the proper strings. Are you also using Ubercart to get the USPS shipping quotes?

Regards
Santhosh Raju

thedeed’s picture

Yes we are having the same issue with the Usps quotes in drupal 6 /Ubercart 2
U.S.P.S. Parcel Post<sup>&reg;</sup>: $8.90
U.S.P.S. Priority Mail<sup>&reg;</sup>: $9.25

Can someone please upload a patch or patched module. Thanks for any help on this matter in advance.

sah62’s picture

It might be worth watching this bug report:

http://drupal.org/node/1012520