Giter VIP home page Giter VIP logo

Comments (3)

jwar-gilson avatar jwar-gilson commented on September 17, 2024

The "REMOVE_FROM_RATE_NAME" in the DotNetShipping solution also changed and now has multiple variations from the USPS API.

Special characters (e.g. ™, ®) are returned in their HTML form.

OLD:
private const string REMOVE_FROM_RATE_NAME = "& l t ; s u p & g t ; & a m p ; r e g ; & l t ; / s u p & g t ; "

NEW (Suggestions):
PRIORITY MAIL ™
private const string REMOVE_FROM_RATE_NAME_PRIORITY = "& l t ; s u p & g t ; & # 8 4 8 2 ; & l t ; / s u p & g t ;"

FIRST CLASS MAIL ®
private const string REMOVE_FROM_RATE_NAME_FIRSTCLASS = "& l t ; s u p & g t ; & # 1 7 4 ; & l t ; / s u p & g t ;"

OLD:
string name = r.Name.Replace(REMOVE_FROM_RATE_NAME, string.Empty);

NEW (Suggestion):
string name = String.Empty;

if (r.Name.Contains(REMOVE_FROM_RATE_NAME_PRIORITY))
name = r.Name.Replace(REMOVE_FROM_RATE_NAME_PRIORITY, string.Empty);

if (r.Name.Contains(REMOVE_FROM_RATE_NAME_FIRSTCLASS))
name = r.Name.Replace(REMOVE_FROM_RATE_NAME_FIRSTCLASS, string.Empty);

from dotnetshipping.

jwar-gilson avatar jwar-gilson commented on September 17, 2024

Sorry, I don't know how to put the REMOVE_FROM_RATE_NAME, REMOVE_FROM_RATE_NAME_PRIORITY or REMOVE_FROM_RATE_NAME_FIRSTCLASS assignments in "blocks"? So the assignments are without the spaces.

from dotnetshipping.

kylewest avatar kylewest commented on September 17, 2024

Hey @Jwahr, thanks for the report! I'm not entirely sure what you're referring to here. Can you put this into a pull request so I can merge it in? Thanks so much!

Kyle

from dotnetshipping.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.