Comments (2)
Hey @albertmourato, the comment you point out doesn't say we're doing it because of a library but because of the javascript library, which simply means the default browser behaviour.
In the test sample you attach, the url you're passing doesn't even seem to be encoded at all... so why trying to decode it?
When URL-encoding, reserved characters are replaced by their percent-based equivalent. In particular, +
characters should be turned into %2B
and spaces should be replaced by +
symbols in the encoded string.
The wikipedia Percent encoding article has a comprehensive description of the algorithm. In Javascript Madness: Query String Parsing you can read about the rationale of the code you're seeing in metal-uri
.
Based on this, I presume the code is correct and that it's likely that your usage of it might not be. Could you take a closer look at this to see if we can sort it out?
Thanks!
from metal-plugins.
Hi @jbalsas ,
Thank you so much for your detailed explanation.
That must be a problem on our side.
I tried locally adding a encodeURIComponent
before calling the decode function.
As expected, it worked fine.
Thank you again.
from metal-plugins.
Related Issues (20)
- [metal-drag-drop] Add an option to refer element instead of mouse position when hovering a target and drop something
- [metal-drag-drop] Mouse position moves away from the element when the page is fully scrolled down HOT 1
- [metal-drag-drop] Draggable elements are not clickable HOT 3
- [metal-drag-drop] Provide some CSS class to the element being dragged HOT 3
- [metal-drag-drop] Drag.toElements_ method does not support every valid selector
- [metal-drag-drop] Allow defining a scroll container for autoScroll
- [metal-debounce] Stop including @babel/polyfill HOT 2
- [metal-drag-drop] scroll is looping when dragging an item
- [metal-drag-drop] issue on removeAllListener
- Move metal-debounce to this repo HOT 1
- Move metal-structs to this repo
- [metal-anim
- [metal-router] using window.onbeforeunload does not work for popstate events HOT 1
- [metal-useragent] User Agent is not being detected since v2.2.0 HOT 1
- [metal-storage] Doesn't work with jsdom @ >11.12.0 HOT 2
- [metal-drag-drop] Drag event doesn't propagate original event HOT 6
- [incremental-dom-string] Possible XSS injection when rendering server-side HOT 1
- [metal-drag-drop] Placeholder is added to the target list HOT 4
- [metal-drag-drop] Incorrect hovered items when there is horizontal scroll HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from metal-plugins.