473,320 Members | 1,694 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,320 software developers and data experts.

URLEncode and HTMLEncode changed?

me
Why are characters like ' ! _ % not encoded using the
mentioned methods? ASP.OLD would encode those.

I need to encode strings that I put in a database, and
not get into trouble with chars that have special meaning
in sql. I know I can do string.replace("'","''") but it
would be nice with an encoder that takes care of every char.
Nov 18 '05 #1
1 934
try this in asp

<%=Server.HTMLEncode("< ' ! _ % >")%>

you will get html only for the brackets <>

Alexey
"me" <wt*****@forum.dk> wrote in message
news:6f**************************@posting.google.c om...
Why are characters like ' ! _ % not encoded using the
mentioned methods? ASP.OLD would encode those.

I need to encode strings that I put in a database, and
not get into trouble with chars that have special meaning
in sql. I know I can do string.replace("'","''") but it
would be nice with an encoder that takes care of every char.

Nov 18 '05 #2

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

Similar topics

3
by: JP SIngh | last post by:
Hi All I have users who upload files using my application using ASPUPLOAD component. My code uploads the file to a network location and once the upload is finish I display the hyperlink using...
3
by: MyndPhlyp | last post by:
There has to be a simple method for un-encoding output from Server.URLEncode or Server.HTMLEncode using server-side VBScript but I just can't find it. I'd appreciate it very much if some sharp...
1
by: Jim | last post by:
Hello, I'm trying to do urllib.urlencode() with unicode correctly, and I wonder if some kind person could set me straight? My understanding is that I am supposed to be able to urlencode...
4
by: Andreas Klemt | last post by:
Hello, is there a difference between System.Web.HttpUtility.UrlEncode and Server.UrlEncode ?
3
by: Michael Gaillez | last post by:
Hi, I'm dynamically loading an assembly into an ASP.NET application. In the control that I load from that dynamic assembly I've tried to use Server.HTMLEncode but this results in a serious...
4
by: djc | last post by:
1) I just recently used my own function which simply replaces cariage return / line feed characters with <br> tags for a large detail field before showing it via an asp.net page to preserve line...
3
by: Kevin Frey | last post by:
Can anyone tell me the logical reason for the above. I've read the documentation and made note of the fact that the Label might be used to display user input, which might be malicious script etc,...
1
by: burnsy2000 | last post by:
We are running ASP classic on IIS 5 on W2k SP4. We recently added <% Response.charset="utf-8"%to the top of all our pages (as suggested by validator.w3.org). A problem arose on a page which applies...
1
by: Author | last post by:
I got into trouble with this problem. The data I am presenting in a GridView control has a column called "Website". That data comes from a stored procedure in SQL Server 2000. Most of them...
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: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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
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.