Hi,
I'm currently using the System.Uri class for my application. Now, I need the
URL the user enters (and that is parsed to the System.Uri constructor) to be
normalized, so that every unnecessary (or even malicious) stuff is deleted.
Is this possible, and if so, how?
Thanks
Peter 4 2331
Hi Peter,
System.Uri converts URLs into their canonical form in the constructor
automatically and throws a UriFormatException if it can't format it. If you
need to check the URL first you might want to consider regular expressions.
Cheers,
Steve Goodyear
Vancouver, BC
Thanks so far! But when I pass a string/URI that contains e.g. the hex value
'%41' for 'A' the System.Uri class does not decode this one....does it?
At least System.Uri.AbsoluteUri just remains the same....
Greetings
Peter
"Steve Goodyear" wrote: Hi Peter,
System.Uri converts URLs into their canonical form in the constructor automatically and throws a UriFormatException if it can't format it. If you need to check the URL first you might want to consider regular expressions.
Cheers, Steve Goodyear Vancouver, BC
You can use System.Web.HttpUtility.UrlDecode()
--
Dave Sexton dave@www..jwaonline..com
-----------------------------------------------------------------------
"Peter Schmitz" <Pe**********@discussions.microsoft.com> wrote in message news:1E**********************************@microsof t.com... Thanks so far! But when I pass a string/URI that contains e.g. the hex value '%41' for 'A' the System.Uri class does not decode this one....does it? At least System.Uri.AbsoluteUri just remains the same....
Greetings Peter "Steve Goodyear" wrote:
Hi Peter,
System.Uri converts URLs into their canonical form in the constructor automatically and throws a UriFormatException if it can't format it. If you need to check the URL first you might want to consider regular expressions.
Cheers, Steve Goodyear Vancouver, BC
You can use System.Web.HttpUtility.UrlDecode()
--
Dave Sexton dave@www..jwaonline..com
-----------------------------------------------------------------------
"Peter Schmitz" <Pe**********@discussions.microsoft.com> wrote in message news:1E**********************************@microsof t.com... Thanks so far! But when I pass a string/URI that contains e.g. the hex value '%41' for 'A' the System.Uri class does not decode this one....does it? At least System.Uri.AbsoluteUri just remains the same....
Greetings Peter "Steve Goodyear" wrote:
Hi Peter,
System.Uri converts URLs into their canonical form in the constructor automatically and throws a UriFormatException if it can't format it. If you need to check the URL first you might want to consider regular expressions.
Cheers, Steve Goodyear Vancouver, BC This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: JoeB |
last post by:
I found an interesting thread on this from Nov., 2000, but it didn't
fully answer my question. I understand normalization, but am trying to
find the line between good database design and personal...
|
by: Kostas |
last post by:
Hi all,
I strived understanding the concepts of all normal forms up to the
domain-key normal form but there are some issues I still am unsure of, and I
will describe the first one in this post....
|
by: John Welch |
last post by:
I have three tables and the way they are currently set up violates good
normalization, but I'm having trouble figuring out a better way. Can someone
suggest a more elegant solution?
My tables...
|
by: Tom |
last post by:
Hi:
I have a question regarding normalization of a database. I am trying
to model the inspection and repair of items. Also need to track when
they go in service, out of service and several...
|
by: hippomedon |
last post by:
Hello everyone,
I'm looking for some advice on whether I should break the
normalization rule. Normally, I would not consider it, but this seems
to be a special case.
I have created an...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |