473,326 Members | 2,102 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

URL Decode HTML encoded in JavaScript

Hello. I have some HTML that I would like to pass to a popup webform via a
querystring. I've run into some problems which I believe is because I need
to encode the HTML. The popup webform is being created via JavaScript so I
need to use JavaScript to encode the HTML. The problem is that I'm not sure
if the URLDecode function in .NET is fully compatible with the encoding
function in JavaScript.

I found the following two JavaScript encoding functions:

escape(param)
encodeURI(param)

I'm leaning towards using encodeURI as it is a newer, and probably more
reliable function. Has anyone used the encodeURI function before with
..NET's URLDecode function? Do they work well with each other??

TIA,
Ben
Nov 19 '05 #1
1 2377
Ben Amada wrote:
escape(param)
encodeURI(param)

I'm leaning towards using encodeURI as it is a newer, and probably more
reliable function.


After some more testing, it seems as though the 'escape' function works
better. Specifically with a # sign, encodeURI doesn't encode it at all
which is giving me problems. 'escape', on the other hand, properly encodes
the # to %23.

So I guess my question now is, is .NET's URLDecode function fully compatible
with JavaScript's 'escape' function? Is anyone else using anything else
besides 'escape' that they've found works better?

Thanks once again,
Ben
Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Pavils Jurjans | last post by:
Hallo, I am working on multilingual web-application, and I have to be very sure about how the international characters are encoded and decoded in the client-server form requests. There's a...
2
by: Chris | last post by:
Wondering if anyone can help me... I have a text node that has been HTML encoded. The text is has CDATA tags around it. The problem is I can't seem to decode the text. When the CDATA is gone, I...
4
by: Newbie | last post by:
How would I modify this form to encode *all* the characters in the 'source' textarea to the '%xx' format & place result code into the 'output' textarea? (cross browser compatable) Any help is...
1
by: AR | last post by:
I would like to know more about the Encode/Decode feature available within MS Access. This is what I have read from Microsoft Office OnLine: "The simplest method of protection is to encode the...
0
by: cdonyi | last post by:
Hi I am looking for a clean way to scrub HTML encoded strings and display only certain tags back to the browser. I am thinking of using HttpUtility.HTMLEncode/Decode methods. My plan is to...
0
by: Asha | last post by:
greetings, attach below are javascripts, if you notice there is a keyword called escape which encodes the entire file and pass onto another fill to be decoded. here are my implementation for...
3
by: Guoqi Zheng | last post by:
Dear sir, I need to decode base64 encoded email. I used below function but it does not work correctly, especially when I need to decode some Characters like Chinese, Can some one point out...
2
by: aurora | last post by:
I have some unicode string with some characters encode using python notation like '\n' for LF. I need to convert that to the actual LF character. There is a 'unicode_escape' codec that seems to...
15
by: glacier | last post by:
I use chinese charactors as an example here. "'\\xc4\\xe3\\xba\\xc3\\xc2\\xf0'" My first question is : what strategy does 'decode' use to tell the way to seperate the words. I mean since s1 is...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.