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

HttpUtility.HtmlEncode not producing CSS-safe text

I have some data coming in from a DB that I need to render in a multiline
textbox. I'd rather keep the markup intact, but for some reason, multiline
textboxes won't escape the codes. But the big problem happens when I try to
encode the string anyway. My text has some special characters, like ®, that
encode to ®. This error code is apparently causing CSS validation
errors because HttpRequest.ValidateString (via its CSS helper class) doesn't
like & when it is followed by a #. So is there a different way to encode
this string to display properly in an ASP.Net page (and submit, but without
turning of request validation for the entire page)?
Jul 19 '06 #1
0 925

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

Similar topics

4
by: abcd | last post by:
Simple but not working at this moment I have to fill the HTML select control.... my values could be for example "test number 1" sample code, dim x Data = "test ...
4
by: diablo | last post by:
Hi I have a website where people can enter comments into a textarea - some of these may have a bit of html - like links - or <blockquote> the comments are stored in a Access2000 mdb file - A...
5
by: bullshark | last post by:
Hi all. Just tearing my hair out here. VSN03 XP all latest. I'm trying to gain use of System.Web.HttpUtility.UrlEncode("string"). The problem is, it isn't there. I've got:
4
by: Andreas Klemt | last post by:
Hello, is there a difference between System.Web.HttpUtility.UrlEncode and Server.UrlEncode ?
4
by: Andrea Williams | last post by:
I have a class that imports System.Web.UI.Page. The code below works: public string JScriptEncode(string strValue) { strValue = strValue.Replace(@"'", "\x27"); //' JScript encode...
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...
0
by: Chris Leffer | last post by:
Hi. I am having problems to use HtmlEncode with strings that use accents. My page uses some expressions like that: <%# Server.HtmlEncode(DataBinder.Eval(Container.DataItem, "Name").Trim) %> ...
4
by: Andy Fish | last post by:
When using databinding, I have gotten into the habit of using single quotes (apostrophe) round attribute values rather than double quotes because this allows visual studio to work when there are...
2
by: Wayne Wengert | last post by:
I am trying to use the HttpUtility methods shown below in a Windows Form. I cannot get Intellisense to accept the code - I've used Imports System.Web and I also tried adding the specific name space...
7
by: jaja | last post by:
Hello all, I am familiar with the HtmlEncode Server method. I also read this : http://msdn2.microsoft.com/en-us/library/a2a4yykt(VS.80).aspx My question is: If I want to encode all inputs from...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
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...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
Oralloy
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 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.