Code Monkey home page Code Monkey logo

Comments (5)

yshrsmz avatar yshrsmz commented on September 18, 2024 1

Sorry, I mean "customer" by "client".

I need to create a URL for my partner company's web service(e.g. https://example.com/login?callbackState=k1=v1%26k2=v2)

from ufo.

pi0 avatar pi0 commented on September 18, 2024

Hi @yshrsmz. While it is true about SearchParams behavior, withQuery version is properly parsed by URL (spec is splitting by &).

// k1=v1&k2=v2
console.log(new URL('https://example.com?p=k1=v1%26k2=v2').searchParams.get('p'))

Do you have an example that current behavior is making problems?

from ufo.

yshrsmz avatar yshrsmz commented on September 18, 2024

Hi @pi0

Do you have an example that current behavior is making problems?

I'm not 100% sure but one of my clients seems to have very naive query parsing logic and = in query value seems to be causing a problem for them(like split by ?, split by &, and then split by =).

So I thought it would great if ufo can support encoding = char.

from ufo.

pi0 avatar pi0 commented on September 18, 2024

I see. Implementing a change would be easy but since the goal of ufo is to stick with the standard and do less possible encoding in normalized/stringified URLs, I need better context of what clients (browser?) do not properly work.

from ufo.

pi0 avatar pi0 commented on September 18, 2024

Can you possibly please ask him/her about what library/software is used and broken? That would help a lot deciding about this. In the meantime i will double check whatwg parser. Worst case we can add a flag for this :)

from ufo.

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.