176 questions
-1
votes
1
answer
165
views
Parameter encoded with encodeURIComponent, how to get it in a Python Bottle server?
Let's say I send a request with JavaScript:
fetch("/query?q=" + encodeURIComponent("c'est un château? Yes & no!"));
to a Python Bottle server:
from bottle import Bottle, ...
1
vote
0
answers
398
views
Sanity GROQ query with Rest API
I am trying to query some data from my sanity project in a Retool app. So, I am using http query to send a GROQ GET request to the endpoint:
https://<projectId>.apicdn.sanity.io/<YYYY-MM-DD&...
1
vote
2
answers
625
views
Encoding URI query parameter with slash (without double encoding) and special characters in Java
I have 2 string variables with sample input:
content: "m/=a"
sms: "TEST123 ~!@#$%^&*()_+{}:<>?"
I need to send these two variables as query params using GET method. ...
0
votes
1
answer
130
views
JavaScript - Array of data to URL string encoding only keys and values
I am trying to encode URI parameters for an ajax call in Wordpress without using JQuery. I think I achieved this, but I really don't know if it is a usefull function or it is just useless because ...
0
votes
1
answer
2k
views
how to escape underscore in the URL using encodeURIComponent
i've been working on my code. i wanted to encode my url that includes an underscore, but my code is not working. i've use encodeURICopmponent and it seems that it doesnt include underscore.
requestUrl:...
0
votes
0
answers
1k
views
Alternatives to encodeURI and encodeURIComponent to replace escape
I am posting data to a site that often includes French characters. This site has a form which handles the French characters fine but I had trouble when sending doing this inside a node program.
An ...
0
votes
0
answers
99
views
With the OData protocol, using filter, how can I write ' instead of %27?
I want to do a search using the filter parameter of the OData v4 protocol using the contains operator.
In the code I write example?$filter=contains(name,'John').
But in the request this translates to ...
2
votes
1
answer
4k
views
How to ensure that axios encode my space to %20 and keep $ as it is?
this is a part of my url url -
foo?$filter=fooNum eq '1234567'
when sending the axios request, axios encodes it to - foot%24filter=fooNum+eq+%27123456%27
Now my backend doesnt understand "+"...
-1
votes
1
answer
365
views
Request HTTP giving binary gibberish results instead of readable text (possible encoding problem?)
Nodejs project that scraps information from a phone web address is returning empty results. When it does the requestHTTP the result that comes off of console.log is something like this>
\u001f�\b\...
3
votes
3
answers
771
views
Laravel - Proper way to support a URL piece that might have a slash in it?
I've defined a route in web.php that looks like this:
Route::delete('/app/charges-for-order/{orderId}', 'AppController@deleteOrderCharges');
It seems to work well apart from when orderId has a forward ...
0
votes
0
answers
185
views
Difference encodeURIComponent in JS and Uri.EscapeDataString in .NET
I have the following two lines of code.
JS:
var chars = encodeURIComponent(input).split("");
VB.NET:
Dim chars As Char() = Uri.EscapeDataString(input).ToCharArray
Should they in theory not ...
1
vote
0
answers
137
views
Cannot get encode caret ^ symbol in the url
I have a problem to get encoding the caret ^ symbol in the URL. The console log error messages are URIError: URI malformed. I am using the encodeURIComponent function to encode the data in the URL. ...
1
vote
0
answers
143
views
Uncaught (in promise) URIError in React
No response when clicking the “edit” buttons after updating the details with symbols. If without symbols, it responded when clicking the “edit” buttons.
I have checked the console. The error messages ...
0
votes
1
answer
297
views
EncodeURI in javascript (velo) returns unexpected value
I've been trying to get value from encodeURI in id. This code in javascript is in velo (wix) plataform coding.
Every trying the id get encode in the first characters but not complete and unexpected.
...
1
vote
0
answers
2k
views
how to send query parameter which is a list which has strings (a string has comma)
request
{
params: {
devices: ['iPad12,1', 'LH-12', 'LX-12']
}
}
to send a devices query parameter with array, I reduced array to a string with comma. ('iPad12,1,LH-12,LX-12')
in this ...
1
vote
1
answer
671
views
JavaScript `URL`: when to encode when setting `pathname`?
When setting the pathname of a URL, when should you encode the value you are setting it to?
When I say URL I mean this API: https://developer.mozilla.org/en-US/docs/Web/API/URL
When I say "...
2
votes
2
answers
2k
views
Should we enclose filename with encodeURIComponent in Javascript?
I'm accepting files to be uploaded to my site. So, is it a safe practice to encodeURIComponent the filename? Or should I use escape()? OR is it necessary at all?
1
vote
1
answer
517
views
encodeURIComponent but in lowercase
I have some requirements which would be easily fulfilled by using the encodeURIComponent straight up, but life is never easy, because of the particular workings of this client's system, we need to ...
1
vote
1
answer
378
views
Dynamic CSV generated file downloads with UTF characters
So I have this code that creates a download dynamically from any array of objects with matching keys (I got it from another SO question, I'd love to credit the author, but I can't find the link):
var ...
-1
votes
1
answer
1k
views
encodeURIComponent() Lowercase
In JavaScript, I want to use encodeURIComponent() but the output is in uppercase.
console.log(encodeURIComponent("[Abcd123]"));
//returns %5BAbcd123%5D
I want to have a lowercase result ...
0
votes
3
answers
989
views
nextjs: Error serializing `.product` returned from `getStaticProps` in "/prints/[name]"
I have a Strapi nextjs app with 2 categories of products.
It's all good on local but I have this error when I try to build:
Error serializing .product returned from getStaticProps in
"/prints/[...
0
votes
0
answers
248
views
Error : encoded URI return an error on a nextjs app deployed with firebase
I have an nextjs app deployed on firebase. Each product that has a space encoded with %20 returns an error : An unexpected error occurred.
It worked well on localhost but not anymore when I deploy.
Do ...
0
votes
0
answers
371
views
AngularJS URL parameter returning a 404 upon encoding
I am trying to pass a string as a url parameter, specifically as param1 in my URL. Here is the router code in my AngularJS code
.when('/test/:param1?/:param2?', {
templateUrl: 'components/test/...
1
vote
0
answers
2k
views
How to render an image received in Raw data format?
I have a React front end application. I am calling an API which is giving me a response of a file image in raw data format, like given below -
�PNG
IHDR\ ���HiCCPICC ProfileH��WXS��[RIh�H ��&...
1
vote
0
answers
863
views
How to recover from decodeURI(encodeURIComponent(originalString))?
I have some legacy code (pre-React) that encodes part of a URL with encodeURIComponent before calling history.push() on the https://www.npmjs.com/package/history module in order to navigate to that ...
0
votes
1
answer
116
views
EncodedURIComponent getting encoded again after using EncodeURI
Im trying to endcode a URL. One of the param value in the URL has & in it and hence we are using encodeURIComponent to encode it. After that, we also need to encode the whole URL, and the encoded ...
0
votes
0
answers
165
views
Exporting HTML table as CSV doesn't get me the full table
So I'm using the following script to export a table do CSV where 'rows' is an Object with each row as an Object, it works just fine, but the problem is that when I download the table it just gives me ...
0
votes
1
answer
711
views
Only escape "special" URI characters in Javascript
In JavaScript there are the two methods encodeURI() and encodeURIComponent(). The former method only replaces special characters such as spaces, umlauts, accent marks, etc. The latter also replaces ...
0
votes
2
answers
5k
views
enocde uri in React Router
Is there any way to encode the uri in to prop of <Link> in react router.
my code:
<Link to={`info/${props.movie.Title}`}> info </Link>
I have tried encodeURI() but it does not work....
6
votes
1
answer
6k
views
Creating and downloading text file from string in JavaScript: Blob/createObjectURL vs. encodeURIComponent
As I've been looking for a way to create and download a text file from a website with JavaScript, I've found a bunch of solutions but generally using either Blob/createObjectURL or otherwise ...
0
votes
2
answers
2k
views
Decode URL on Mobile from '%7C' to '|'
We are using the code below to be able to link to a specific tab on our website.
As it is currently made, it allows us to link to the specific tab by adding #member-tabs|3 to the URL, where member-...
1
vote
2
answers
2k
views
encodeURIComponent does not encode line breaks from HTML data attribute
I am trying to encode String to URI using encodeURIComponent, the data string I am retrieving is from the data-* attribute in HTML using jQuery.
encodeURIComponent works as expected if I am storing ...
0
votes
1
answer
137
views
How do I create CSV that an API can parse from a string?
I am looking to create a CSV from a string that I can send to a Qualtrics API to run a call. The call I am trying to run is at this URL:
https://api.qualtrics.com/reference#start-response-import
The ...
0
votes
1
answer
380
views
Javascript: encodeURIComponent returns diffrent value between the value typed in keyboard and value pasted from clipboard
I'm facing the problem with the URL encoding when sending the search request with the query.
My query accepts the UTF-8 characters from the input form element.
But the value encoded is very ...
1
vote
0
answers
4k
views
sanitize-html vs encodeURIComponent URL to prevent Reflected XSS attack in Javascript
I want to prevent my app against Reflected XSS attack caused by passing scripts in url like :
https://www.myapp.com/profile/?year=2020<script>alert('Boo!');<!--
What would be the best way to ...
5
votes
1
answer
4k
views
Equivalent of Javascripts encodeURI in Powershell?
What is the equivalent of Javascripts encodeURI() / encodURIComponent() in Powershell?
I'm encoding a URL (need some %20s in it) and I hate to do that manually.
1
vote
2
answers
11k
views
How to encode a portion of path in URI using UriComponentsBuilder?
I have a path that looks like this: /service/method/{id}/{parameters} which I call using restTemplate, where /service/method is a microservice, {id} is some id that I need to ask for, and {parameters} ...
1
vote
2
answers
9k
views
encodeURI(JSON.stringify()) showing %255B in URL
I am trying to pass along a queryParam in Angular that consists of an array of objects as such fooArray = [{foo: 'bar', foo: false}, {foo: 'bar', foo: false}]. In the URL queryParam I am receiving the ...
0
votes
0
answers
528
views
Why im getting Exception- Not enough variables available to expand in Spring Rest URI call?
im working on a rest API call related to Payments. But i encountered with an exception. I know this comes due to setting parameters to the rest uri.
String uri = "https://test-gateway.mastercard.com/...
0
votes
0
answers
338
views
Window.Open() is not working when passing encoded url
I am passing a filepath for excel sheet download through encodeURI component and i am passing the encoded url to window.open() method in javascript but, what happens is a new tab is opening but it is ...
0
votes
0
answers
404
views
AngularJS Filter with encodeURIComponent Not Working in Link
I am trying to encode a value passed in an URL using a filter that calls encodeURIComponent.
My original filter
angular.
module('machineorderDetail').
filter('encodeURIComponent', function ()...
0
votes
0
answers
256
views
Encode and decode in html audio player tag for #,& and + symbols
I have an angular 6 application in which i have some html audio player sections. I have encoded mp3 files via encodeURIComponent and used in src tag. Audio plays fine for below player
<audio ...
0
votes
0
answers
248
views
special character in URL
I'm trying to open a OneNote file from Google Chrome, my URI has a German character (ä,ß).
After clicking on the link, its open the OneNote but it shows an error message that The specified location ...
0
votes
1
answer
39
views
why cant i put a var in a encodeURI?
why is this working?
var movieName = encodeURI("deadpool");
var url = "https://api.themoviedb.org/3/search/movie?api_key=" + apiKey + "&query=" + movieName;
and this not?; iven put a console log ...
5
votes
2
answers
6k
views
dynamic image path not showing in [style.background-image] property in Angular 7
I am trying to use dynamic image path as background image in one of my Angular6 project.
I have tried using [style.background-image] & [style.background] even encodeURI to fix spaces in path also ...
0
votes
0
answers
29
views
Unable to download variable to file in any browser other than Chrome using AngularJS [duplicate]
I need to allow users to download a CSV file, I have the CSV as a string value. The following function works in Chrome, but not for IE 10/11, Edge or Firefox.
function downloadCSV(CSV, fileName) {
...
1
vote
1
answer
554
views
javascript encodeURIComponent and escape?
I use JS to sent encodeURIComponent string to a PHP file write and has been working fine for years; until recently I met with a strange effect that the text need to be further encoded with escape in ...
0
votes
0
answers
269
views
svg capture using HTML canvas is not working in safari browser
I have one svg element I want to capture the svg with a html canvas. This svg elment contains one image in base64 format and some group of path.
Now the capture is working perfectly. But when I am ...
0
votes
2
answers
1k
views
DecodeURIComponent is not supporting for %uXXXX encoded component
DecodeURIComponent is not supporting for few encoded component
I am sending JD with bulletin format in my json , in restapi . So I am encoding the jd and sending. this works properly without any ...
1
vote
0
answers
1k
views
encodeURIComponent not returns svg
Hello Guys encodeURIComponent not returns my svg.
var svg ='<svg id="vgroovFrame" xmlns="http://www.w3.org/2000/svg" width="576" height="720"><defs> <pattern id="matpattern" x="0" y="0"...