When I create a web site, there are some places that allow user to input
html code, like in content of a message. But for security purpose, you can
not allow user use all html features, like javascript. I found some sites
are using UBB code and claim it is safer. I am wonderring if .NET provides
some easier way for this? I feel that .NET does have a feature to avoid user
type in html code, but is there a feature that allows some safe html code
but not others?
Thanks! 4 1444
You could provide your own markup code, or inspect the code to make sure
it's only have your own approved tags. Get a Regex to find all tags, and
then if one of them doesn't match your list of few tags, then reject the
message.
"Safe HTML" depends on the site and what you deem to be bad. Obviously
SCRIPT is not good, but having people put arbitrary styles and overwrite
your page (and get people to click on fake links that appear to be part of
your page) can be just as damaging.
-mike
MVP
"david" <wy*****@hotmai l.com> wrote in message
news:ux******** ******@TK2MSFTN GP09.phx.gbl... When I create a web site, there are some places that allow user to input html code, like in content of a message. But for security purpose, you can not allow user use all html features, like javascript. I found some sites are using UBB code and claim it is safer. I am wonderring if .NET provides some easier way for this? I feel that .NET does have a feature to avoid
user type in html code, but is there a feature that allows some safe html code but not others?
Thanks!
You could provide your own markup code, or inspect the code to make sure
it's only have your own approved tags. Get a Regex to find all tags, and
then if one of them doesn't match your list of few tags, then reject the
message.
"Safe HTML" depends on the site and what you deem to be bad. Obviously
SCRIPT is not good, but having people put arbitrary styles and overwrite
your page (and get people to click on fake links that appear to be part of
your page) can be just as damaging.
-mike
MVP
"david" <wy*****@hotmai l.com> wrote in message
news:ux******** ******@TK2MSFTN GP09.phx.gbl... When I create a web site, there are some places that allow user to input html code, like in content of a message. But for security purpose, you can not allow user use all html features, like javascript. I found some sites are using UBB code and claim it is safer. I am wonderring if .NET provides some easier way for this? I feel that .NET does have a feature to avoid
user type in html code, but is there a feature that allows some safe html code but not others?
Thanks!
Thanks! that helps.
"Michael Giagnocavo [MVP]" <mg*******@Atre vido.net> wrote in message
news:Ok******** ******@TK2MSFTN GP10.phx.gbl... You could provide your own markup code, or inspect the code to make sure it's only have your own approved tags. Get a Regex to find all tags, and then if one of them doesn't match your list of few tags, then reject the message.
"Safe HTML" depends on the site and what you deem to be bad. Obviously SCRIPT is not good, but having people put arbitrary styles and overwrite your page (and get people to click on fake links that appear to be part of your page) can be just as damaging.
-mike MVP
"david" <wy*****@hotmai l.com> wrote in message news:ux******** ******@TK2MSFTN GP09.phx.gbl... When I create a web site, there are some places that allow user to input html code, like in content of a message. But for security purpose, you
can not allow user use all html features, like javascript. I found some
sites are using UBB code and claim it is safer. I am wonderring if .NET
provides some easier way for this? I feel that .NET does have a feature to avoid user type in html code, but is there a feature that allows some safe html
code but not others?
Thanks!
Thanks! that helps.
"Michael Giagnocavo [MVP]" <mg*******@Atre vido.net> wrote in message
news:Ok******** ******@TK2MSFTN GP10.phx.gbl... You could provide your own markup code, or inspect the code to make sure it's only have your own approved tags. Get a Regex to find all tags, and then if one of them doesn't match your list of few tags, then reject the message.
"Safe HTML" depends on the site and what you deem to be bad. Obviously SCRIPT is not good, but having people put arbitrary styles and overwrite your page (and get people to click on fake links that appear to be part of your page) can be just as damaging.
-mike MVP
"david" <wy*****@hotmai l.com> wrote in message news:ux******** ******@TK2MSFTN GP09.phx.gbl... When I create a web site, there are some places that allow user to input html code, like in content of a message. But for security purpose, you
can not allow user use all html features, like javascript. I found some
sites are using UBB code and claim it is safer. I am wonderring if .NET
provides some easier way for this? I feel that .NET does have a feature to avoid user type in html code, but is there a feature that allows some safe html
code but not others?
Thanks!
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Rob |
last post by:
i know javascript, vbscript, asp css and alot more and im only 14 i was
wondering which is easier to learn php or cgi. any help?
|
by: RobertMaas |
last post by:
After many years of using LISP, I'm taking a class in Java and finding
the two roughly comparable in some ways and very different in other
ways. Each has a decent size library of useful utilities as a standard
portable part of the core language, the LISP package, and the java.lang
package, respectively. Both have big integers, although only LISP has
rationals as far as I can tell. Because CL supports keyword arguments,
it has a wider range...
|
by: mike420 |
last post by:
map(lambda f: f(1), )
Oh, OK, it was a typo (1 instead of i). I take it all back (for now).
It was an honest mistake, not a troll! Still, I think it should
be instead of
|
by: Andreas Prilop |
last post by:
Here is an illustration of the warning
http://ppewww.ph.gla.ac.uk/~flavell/charset/browsers-fonts.html#dont
that you should not specify a typeface when you have characters
outside West European Latin-1 on your page.
The reference test page is
http://www.unics.uni-hannover.de/nhtcapri/temp/arial.html
This http://www.unics.uni-hannover.de/nhtcapri/temp/face-arial.gif
is the horrible result in Mozilla 1.3 on Mac OS 9.1 when I do
|
by: Mario T. Lanza |
last post by:
Greetings,
I have been developing websites in CSS for a couple years; I claim to
be no expert, but certain things could definitely be easier.
Consider the box model and it's different implementations:
http://tantek.com/CSS/Examples/boxmodelhack.html
Microsoft's way and the web standards way. Ironically, though
| |
by: david |
last post by:
When I create a web site, there are some places that allow user to input
html code, like in content of a message. But for security purpose, you can
not allow user use all html features, like javascript. I found some sites
are using UBB code and claim it is safer. I am wonderring if .NET provides
some easier way for this? I feel that .NET does have a feature to avoid user
type in html code, but is there a feature that allows some safe html...
|
by: Steven T. Hatton |
last post by:
Stroustrup's view on classes, for the most part, seems to be centered around
the notion of invariants. After a bit of adjusting to the use of yamt (yet
another math term) in computer science, I came to appreciate some of the
significance in what he is asserting. I believe a good example would be
the Riemann-Christoffel curvature tensor. In the 4-space of general
relativity, there are 256 components of this beast.
One approach to...
|
by: mvendertaca |
last post by:
I've created a usercontrol which is hosted in Internet Explorer. It
with some action buttons. I could place all buttons on this
usercontrol but I did not. When the user presses one of the buttons i
detect some more action needs to be taken and open a dialogbox. using
ShowDialog. But IE finds a usercontrol opening a dialogbox dangerous
(Although the usercontrol could alsready have done anything because i
have elevated its permissions using...
|
by: howa |
last post by:
Since it is part fo the standard, why I always heard that we should
avoid iframe?
any comments?
thanks.
|
by: EnjoyNews |
last post by:
Hi
I just had a thought regarding spam...
I have noticed that when I do something in JavaAjax then I can't se the
context in the source.
.... If I open a page in a div with Ajax, right click and choose Source,
then the div is empty.
The context in the ajax page is not there.
Off cause you can find the .js file and see what page it opens.
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |