Friday, March 25, 2011

Magic with CSS Styling (Reverse the Full Page Text)

Type the below full STYLE tag (css elements are commented, remove comments to make it work) in any of the free text boxes and submit.
Even it works with blog post as well...

Thats it upon rendering the submitted text, the page renderes the complete html (text) in reverse order from right to left including scroll bars.

To avoid this behaviour the entered text should be encoded while submitting and should not be decoded while rendering (if decoded the page again renders the style tag instead text.

To encode the entered text use the below code statement in the business-logic.
using System.Web;

No comments:

Post a Comment