Quantcast
Channel: Security Vulnerability
Viewing all articles
Browse latest Browse all 317

Microsoft.Security.Application.Encoder.CssEncode how to read result?

$
0
0

hello

asp/net.4.webForm

using Microsoft.Security.Application.Encoder.CssEncode.

string
            s = "background-color: rgb(165, 42, 42);"
            , s2 = Microsoft.Security.Application.Encoder.CssEncode(s);

// s2 result = "background\00002Dcolor\00003A\000020rgb\000028165\00002C\00002042\00002C\00002042\000029\00003B"

the browser dont know how to read that Encoding when using an inline style.. (not on css but on the html tag)

i have tried

c#
HttpUtility.HtmlDecode,
HttpUtility.UrlDecode

js
decodeURIComponent
decodeURI

http://msdn.microsoft.com/en-us/library/system.web.security.antixss.antixssencoder.cssencode(v=vs.110).aspx


 


Viewing all articles
Browse latest Browse all 317

Trending Articles