I have a simple html page with a div element in it.
The innerHTML property of the div is set through query String.
In query string I pass html strings,i.e.
<p style='font-size:20px;color:green;'> Sun rises in the east </p> etc...
I get the appropriate output.
However, if I pass color code in style attribute say, #00990a, I am not displayed any content.
Can someone help me through this?
if theres a color code that contains a
#, everything after that will be treated fragment identifier. to avoid this you have to url-encode your parameter-value (replacing#with%23an d doing the same with other characters that have a special meaning (@&%=?#...)).Finally your url should look like this: